in reply to Re^3: creating HTML table
in thread creating HTML table
You don't need any of that <CSTM> nonsense, or the filter callback.
Here's a template which does all you want:
<table> <tmpl_loop name="rows"> <tr <tmpl_if name="__odd__"> class="odd" <tmpl_else> class="even" </tmpl_if> > <td> <tmpl_var name="data"> </td> </tr> </tmpl_loop> </table>
You put the odd-even logic inside the opening TR tag and HTML::Template does the rest. The source code's going to look a bit weird but the browser doesn't care.
Nobody says perl looks like line-noise any more
kids today don't know what line-noise IS ...
|
|---|