Re: Using a section to display a table with X elements per line
| From: | Monte Ohrt | Date: | Mon, 04 Mar 2002 15:32:02 +0000 |
| Subject: | Re: Using a section to display a table with X elements per line | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-2939@lists.php.net to get a copy of this message | ||
FYI, the example now pads the last row.
http://www.phpinsider.com/php/code/Smarty/contribs/examples/dynamic_table_columns/table.tpl.txt
Bertrand DUNOGIER wrote:
>
> 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
>
> ---
> You are currently subscribed to smarty as: monte@ispi.net
> To unsubscribe send a blank email to $subst('Email.Unsub')
> Visit Smarty's homepage at
> http://www.phpinsider.com/php/code/Smarty/
--
Monte Ohrt <monte@ispi.net>
Director of Technology, ispi Inc.