Foreach/Cycle and multiple templates

From: Date: Thu, 04 Mar 2004 17:38:34 +0000
Subject: Foreach/Cycle and multiple templates
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-11055@lists.php.net to get a copy of this message
I'm using a foreach section with cycle to display table rows with alternating colors. This is achieved by one template. I'm displaying this template multiple times (with different data assigned). Now, the funny thing is that the CYCLE will always start where it left off in the previous template, even if I clear the assigned variables inbetween. It seems as if the CYCLE variable is specific to the smarty object, not to the template. My expected behaviour is that each table I'm drawing should start wiht the same line color. Can this be achieved without creating a new smarty object? Thanks, Andi Andreas Goetz cpuidle@gmx.de http://www.cpuidle.de

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