Re: Special Sections

From: Date: Sun, 07 Oct 2001 07:35:19 +0000
Subject: Re: Special Sections
References: 1  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-1624@lists.php.net to get a copy of this message
hi, Stefan Kugler wrote: > which I want to add a page in 3 colums, like > http://www.borgmistelbach.ac.at/ball.htm > First I thought of a section, but now I get all pics in one > column. Is there any solution only using smarty? if you want to do everything inside your template you can use the following for displaying X columns: <table> {section name=section loop=$data} {if %section.first%} {* first record, start table row *} <tr> {/if} <td> {* display cell data *} </td> {if %section.last%} {* last record, close row *} </tr> {elseif %section.rownum% is div by X} {* record div by X, start a new row *} </tr><tr> {/if} {/section} </table> > Some time ago I read something about indices in the list archive... BTW: was discussed in march 2001 http://marc.theaimsgroup.com/?t=98362197600002&w=2&r=1 andreas -- andreas kossmeier bergfex.at - http://www.bergfex.at

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