in reply to Grouping multiple records in a row...templating ?

I haven't used HTML::Template (alt.), but it looks like the HTML::Template::Expr (alt.) extension provides the functionality you want...

<table><tr> <TMPL_LOOP NAME="PICTURES"> <td><TMPL_VAR NAME="NAME"></td> <TMPL_UNLESS EXPR="ID % 3"> </tr><tr> </TMPL_UNLESS> </TMPL_LOOP> </tr></table>

Update: Simplified (and tested ;)) the template.

    --k.


Replies are listed 'Best First'.
Re: Re: Grouping multiple records in a row...templating ?
by gav^ (Curate) on Apr 18, 2002 at 16:55 UTC
    Without using HTML::Template::Expr or making the assumption that id's are sequential (which has bitten me before) you can do something like this in your Perl code:
    $_->{nextrow) = ($i++ % 3) for @pictures;

    Hope this helps.

    gav^