I'd do it something like this:
$template->param(LOOPSIZE => scalar @data); $template->param(MYLOOP => \@data); # here's the template: <TMPL_LOOP NAME=MYLOOP> <tr> <TMPL_IF __FIRST__> <td rowspan="<TMPL_VAR NAME=LOOPSIZE>">Like this?</td> </TMPL_IF> <td><TMPL_VAR NAME=LOOPVAR></td> </tr> </TMPL_LOOP> -Aaron On Thu, 14 Feb 2002, Barriga, Celso wrote: > Hello, > > I'm new to the list and HTML::Template so I don't know if my question is a > FAQ for this list, but anyway, here it goes... > > Is there a loop context variable or some other way to determine the total > count for my loop? I see the other vars, i.e., __FIRST__, __LAST__, __ODD__, > etc., after enabling loop_context_vars, but not the total loop count. > > Basically what I'm trying to do is create a 2-column table, where one column > would contain every loop element per row, but the other column will just be > one row that I'd create on __FIRST__ element but with a ROWSPAN of > loop_count, so it will cover however number of elements I have. Here's a > textual representation of what I would like to achieve. > > _______________________ > | |___________| > | |___________| > | |___________| > |___________|___________| > > Thanks a lot in advance. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
