Re: Re[2]: Using a section to display a table with X elements per line
| From: | Monte Ohrt | Date: | Mon, 04 Mar 2002 16:04:20 +0000 |
| Subject: | Re: Re[2]: 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-2943@lists.php.net to get a copy of this message | ||
You're right, there was a bug. It is fixed now. It also does not put an
extra row at the bottom either.
Bertrand DUNOGIER wrote:
>
> MO> Does this help?
>
> MO>
> MO> http://www.phpinsider.com/php/code/Smarty/contribs/examples/dynamic_table_columns/table.tpl.txt
> Hmmmm, it could have, but i see several weak points in it:
> - if you come to have a number of elements which is a multiple of
> #columns# you end up with two </tr>
> - The remainings td are not added to the last line: with 6 elements
> with #columns# == 4, we would probably get something like:
> <tr>
> <td>elem 1</td>
> <td>elem 2</td>
> <td>elem 3</td>
> <td>elem 4</td>
> </tr>
> <tr>
> <td>elem 5</td>
> <td>elem 6</td>
> </tr>
> Even if it might work on some browser, it will probably crash with
> most of them...
>
> I think i'll build an array where each element is an array containing
> a "line" of elements, including empty ones.
>
> --
> Bertrand mailto:bdunogier@wanadoo.fr
> INTERACT
> 21, rue de Pont Remy
> L-2423 Luxembourg 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.