Re: column layout question
| From: | Andrei Zmievski | Date: | Tue, 29 May 2001 14:19:45 +0000 |
| Subject: | Re: column layout question | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-838@lists.php.net to get a copy of this message | ||
On Tue, 29 May 2001, Ivo Jansch wrote:
> Hi,
>
> I have an array of items, and I want to devide the result in 2 columns,
> like so:
>
> <td>
> item1<br>
> item2<br>
> item3<br>
> </td>
> <td>
> item4<br>
> item5<br>
> </td>
>
> I tried stuff like {if %sec.index% > %sec.loop% / 2} </td><td> {/if},
> but that also puts a </td><td> between item 4 and 5.
>
> Should be simple, but I can't get it to work :)
>
> Any tips?
How about:
{if %sec.index% is div by 3 and not %sec.last%}
</td><td>
{/if}
-Andrei
"Everything has its wonders, even darkness and silence, and I learn,
whatever state I may be in, therein to be content." - Helen Keller