Page 1 of 1
News module
Posted: Wed May 07, 2008 12:40 pm
by jondrew
Hi
How do I alter the number of charecters or words that are displayed from the news summary. IE I want to limit the length of the news summary on my homepage so it only displays approx. 25 words?
thanks
Jon
Re: News module
Posted: Wed May 07, 2008 2:04 pm
by moorezilla
Whatever you put in the summary field shows up in the summary, so you can just put whatever number of words you want. If you don't put anything in the summary, and put all of your text in the content area, then it all shows up as a summary, I believe.
Re: News module
Posted: Wed May 07, 2008 2:39 pm
by Nullig
You could use the smarty truncate function to limit the number of characters displayed.
Change the summary fields in your news templates from:
{eval var=$entry->summary}
to:
{eval var=$entry->summary|truncate:200}
or whatever number of characters you want to display. This will cut off the output at a the end of a word and add "...".
Nullig
Re: News module
Posted: Wed May 07, 2008 3:10 pm
by jondrew
Hey The truncate thing worked perfect!!

cheers