Using a section to display a table with X elements per line

From: Date: Mon, 04 Mar 2002 15:08:14 +0000
Subject: Using a section to display a table with X elements per line
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-2934@lists.php.net to get a copy of this message
Hi, i'm workin' on a script that displays a table with 3 elements / line, using a section (an images thumbnail browser). At the moment, i'm using a section with a step of 3 and I added 2 custom index_ properties to the section (index + 1 and index + 2) which add 1 and 2 to the section (not step * 1 and step * 2). The problem is that i'd like to give the user the option to chose the number of elements / line... is there any cleaner way ? I thought about something using modulo but i come in a big mess when i reach the end of the section and need to check how many TD i have to close before i close the tr... so ? :) -- Best regards, Bertrand mailto:bdunogier@wanadoo.fr

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