Re: [SMARTY] how do [iteration - 1] in template?

From: Date: Fri, 09 Apr 2004 23:16:10 +0000
Subject: Re: [SMARTY] how do [iteration - 1] in template?
References: 1 2 3 4  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11266@lists.php.net to get a copy of this message
"Messju Mohr" <messju@lammfellpuschen.de> wrote in message news:20040409224801.GA31343@pharao.serveftp.org... > > > > I have a related question... > > > > I need to use the number of items in an array as a parameter to a smarty > > function. IE. > > {if count($items) > 9} > > {show_page_links cnt=count($items)} > > use count as a modifier: > > {show_page_links cnt=$items|@count} > > (the @ is necessary to make the modifier work on the whole array > instead of each element) > Perfect. Thank you. I didn't want to have to change a bunch of pages that weren't passing in an item count. -- Rob

« previous php.smarty.general (#11266) next »