in reply to Loop Context Style with HTML::Template
I'm afraid I'm not too familiar with HTML::Template, but this post motivated me to try solving this problem with Template Toolkit.
<table border="0" cellspacing="0" cellpadding="3"> [% row = 0 %] [% FOREACH table_row %] [% row_bg = row % 2 ? 'c0c0c0' : 'e0e0e0' %] <tr> <td style="background-color: [% row_bg %]">[% content_column_1 % +] </td> <td style="background-color: [% row_bg %]">[% content_column_2 % +] </td> </tr> [% row = row + 1 %] [% END %] </table>
Not exactly an answer to your question, but I thought I'd post it nonetheless. :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Loop Context Style with HTML::Template
by rob_au (Abbot) on Aug 02, 2002 at 23:50 UTC |