Page 1 of 1

[SOLVED] News: add class directly to the {$entry->morelink}

Posted: Mon Apr 25, 2011 1:54 am
by josee225
Hi!

I am currently in the process of adding a complete website template into cmsms. I have done this before, but never encountered this perticular problem with News:

I want my {$entry->morelink} to be styled in a button. My original template is here:
http://gamekeeper.ca/nouveau-site/Blog.html
and the code to add the button is as follow:

Code: Select all

 <a href="Single.html" class="button">Read more</a>
The result in cmsms is here:
http://gamekeeper.ca/cmsms/index.php?pa ... s&hl=fr_FR
(sorry, the result in english is not ready yet!)

So all I want here is to add the class directly into the link generated with the smarty tag. I tried this:

Code: Select all

{$entry->morelink class="button"} 
but it didn't work.

And adding the button class in the surrounding div didn't help either.

Also, my site is bilingual, so I do apreciate the fact that the morelink displays the chosen text in both french and english.

Thank you for your help in advance!

Re: News module: add class directly to the {$entry->morelink

Posted: Mon Apr 25, 2011 12:13 pm
by josee225
I guess I was too tired yesterday to see the obvious...

Here is how I solved it:

Code: Select all

<a href="{$entry->moreurl}" title="{$entry->title|cms_escape:htmlall}" class="button">{if $lang == "fr_FR"}Lire la suite{else}Read more{/if}</a>
I hope it can help!