Page 1 of 1

Modification to News Module for NMS

Posted: Sat Mar 03, 2007 12:01 pm
by girlnerd
Hi,

I need to modify the summary of a news item to show the first x characters of the summary for the Newsletter, NMS.

My guess is that I would move $summary into an array and then use a loop to put the first x number of characters into a variable $shortsummary. Then move that to my newly created template in News for use with my NMS.

Since this is my first foray into modifying templates and modules, any suggestions would be greatly appreciated.

Thanks in advance,
girlnerd

Re: Modification to News Module for NMS

Posted: Thu Dec 13, 2007 9:31 pm
by cyberman
girlnerd wrote: I need to modify the summary of a news item to show the first x characters of the summary for the Newsletter, NMS.
Please try to use modifier truncate

http://smarty.php.net/manual/en/languag ... uncate.php
My guess is that I would move $summary into an array and then use a loop to put the first x number of characters into a variable $shortsummary.
Use capture tag

http://smarty.php.net/manual/en/languag ... on.capture