I would definitely go with option 3, but why not take it one step further? Rename your "__ODD__" template variable to something like "class", then store the full class name instead of just a "1" or "" in that variable.
Greetings Bird,
The problem with that is that the <TMPL_VAR name="__ODD__"> is a loop context variable. It's created and controlled by HTML::Template as the module loops through the array passed to it by reference. I don't think I can mess with it without violating some OOP law.
I could define "class" as an element of the hash of the array of the "some_loop" loop, but one of the reasons I liked the HTML::Template concept was that it didn't require me to do any such defining since the module's code handled everything.
-gryphon
code('Perl') || die;
In reply to Re: Re: Loop Context Style with HTML::Template
by gryphon
in thread Loop Context Style with HTML::Template
by gryphon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |