Do you have a question? Post it now! No Registration Necessary. Now with pictures!
- Posted on
- HTML::Template and __ODD__
- Colin Walls
July 22, 2005, 11:48 am
rate this thread
I have the following code in one of my template files
<!-- TMPL_LOOP NAME="interfaceData" -->
<tr <!-- TMPL_IF NAME="__ODD__" -->class="alternateRow"<!-- /TMPL_IF --> >
<td><!-- TMPL_VAR NAME="interface" --></td>
<td><!-- TMPL_VAR NAME="if_type_description" --></td>
TMPL_VAR NAME="interface_id" -->'
<!-- /TMPL_LOOP -->
The loop works, all the variables insert properly. The only thing that
doesn't happen is the alternate row class style being applied to odd rows
in the table. All I get is the tag "<tr >" appearing on each row.
Could anyone clue me up as to where I am going wrong?
Remove the pink meat to mail me
Re: HTML::Template and __ODD__
Your code looks fine to me so my deduction would be that the __ODD__
is not present and that's why you're getting a blank in the "<tr >".
The most obvious cause of this would be that you've forgotten to set
the loop_context_vars parameter to a true value when calling
HTML::Template->new() or one of its sisters.
By the way, there's a mailing list for HTML::Template here:
James Taylor, London, UK PGP key: 3FBE1BF9
To protect against spam, the address in the "From:" header is not valid.
In any case, you should reply to the group so that everyone can benefit.
If you must send me a private email, use james at oakseed demon co uk.