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

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Post Reply
josee225
Forum Members
Forum Members
Posts: 64
Joined: Sat Jun 06, 2009 12:42 am

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

Post 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!
Last edited by josee225 on Mon Apr 25, 2011 12:14 pm, edited 1 time in total.
josee225
Forum Members
Forum Members
Posts: 64
Joined: Sat Jun 06, 2009 12:42 am

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

Post 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!
Post Reply

Return to “CMSMS Core”