Re: How to do two column list using section?
| From: | Hojtsy Gabor | Date: | Sat, 03 Mar 2001 16:12:25 +0000 |
| Subject: | Re: How to do two column list using section? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-282@lists.php.net to get a copy of this message | ||
> easy ;-)
>
> {section name=list loop=$data}
> {if %list.first%}
> {* first record, start table row *}
> <tr>
> {/if}
> {* display our cell data *}
> <td>{$list/data}</td>
> {if %list.last%}
> {* last record, close row *}
> </tr>
> {elseif %list.index% even by 2}
> {* record even by 2, start a new row *}
> </tr><tr>
> {/if}
> {/section}
I think my one was easier. Erm... At
least shorter. What do you think about it Monte?
Goba
__________________________________________________________________
Hungarian PHP Manual :: Hungarian PHP Mirror :: http://hu.php.net/
The starintg-point for Hungarian webmasters :: http://weblabor.hu/