in reply to Grouping multiple records in a row...templating ?
Template
<table> <tmpl_loop name=TABLE> <tr> <tmpl_loop name=row> <td><tmpl_var name=name> : <tmpl_var name=picture></td +> </tmpl_loop> </tr> </tmpl_loop> </table>
use HTML::Template; my $table = [ { row => [ { name => a11, picture => aaa }, { name => a12, picture => aaa }, { name => a13, picture => aaa }, ] }, { row => [ { name => a21, picture => aaa }, { name => a22, picture => aaa }, { name => a23, picture => aaa }, ] }, { row => [ { name => a31, picture => aaa }, { name => a32, picture => aaa }, { name => a33, picture => aaa }, ] }, ]; my $t = HTML::Template->new(filename => 'aa.tmpl'); $t->param(TABLE => $table); print $t->output;
And you'd better pad the last incomplete row with some dummy elements.
|
|---|