in reply to How to create a table with rows and columns using HTML::Template loops?

##UPDATE I just re read your message and noticed this wont work for you. Sorry. This have been doing the trick for me. For the html template:
<table> <thead> <tr> <!-- tmpl_loop name="fields" --> <th><!-- tmpl_var name="field" --></th> <!-- /tmpl_loop --> </tr> </thead> <tbody> <!-- tmpl_loop name="data" --> <tr> <!-- tmpl_loop name="cols" --> <td><!-- tmpl_var name="value" --></td> <!-- /tmpl_loop --> </tr> <!-- /tmpl_loop --> </tbody> </table>
And, the perl part:
my @fields = qw(your columns names here); $object->get_all(%params); while (my $obj = $object->get_next){ my @row = map {{value => $obj->$_}} @fields; push @data, {cols => \@row}; } $template->param(fields => \@fields); $template->param(data => \@data);
Hope this helps.

Replies are listed 'Best First'.
Re^2: How to create a table with rows and columns using HTML::Template loops?
by BlenderHead (Novice) on Jun 24, 2009 at 04:14 UTC

    If then anyone can help, the question still holds!

    Thanks for trying!

    BH