HTML::Template and __ODD__

HTML::Template and __ODD__

am 22.07.2005 08:48:44 von Colin Walls

I have the following code in one of my template files



class="alternateRow" >



class='button'>Details





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 "" appearing on each row.

Could anyone clue me up as to where I am going wrong?

--
Colin Walls

Remove the pink meat to mail me

Re: HTML::Template and __ODD__

am 22.07.2005 13:56:41 von James Taylor

In article ,
Colin Walls wrote:
>
> 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 "" appearing on each row.
>
> Could anyone clue me up as to where I am going wrong?

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 "".
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:
http://lists.sourceforge.net/lists/listinfo/html-template-us ers

--
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.

Re: HTML::Template and __ODD__

am 22.07.2005 22:20:50 von Colin Walls

James Taylor wrote:
> 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 "".
> 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.

Thanks for that, a case of RTFM. My only excuse is that I was using
templates via CGI::Application.

Mea culpa, mea culpa, mea maxima culpa.

--
Colin Walls

Remove the pink meat to mail me