Re: [SMARTY] alternating background colors

From: Date: Wed, 14 Aug 2002 15:54:12 +0000
Subject: Re: [SMARTY] alternating background colors
References: 1 2 3 4 5 6  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-5706@lists.php.net to get a copy of this message
At 11:25 14/08/2002 -0400, Blue Presley wrote:
I'm using <section></section> to repeat a list of rows from a mysql query. it would be great it there were a parameter to provide 2 colors to alternate in the background cell results. having said that, is anyone out there doing that and if so how are they transferring the color from the php script to the smarty template?
Smarty has a built in function specifically designed for alternating background colours within loops - cycle : http://smarty.php.net/manual/en/language.function.cycle.html Hope that helps, Simon Willison http://www.bath.ac.uk/~cs1spw/blog/

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