Skip Menu |

This queue is for tickets about the HTML-Template CPAN distribution.

Report information
The Basics
Id: 89765
Status: open
Priority: 0/
Queue: HTML-Template

People
Owner: Nobody in particular
Requestors: larslemberg [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: loop_context_var __even__ is not working
Date: Thu, 24 Oct 2013 22:34:26 -0400
To: bug-HTML-Template [...] rt.cpan.org
From: Lars Lemberg <larslemberg [...] gmail.com>
I notice that in the documentation, the example code for the __even__ loop_context_var accidentally refers to __odd__ instead. Additionally, the __odd__ loop_context_var works perfectly for me, but if I edit my code to use the __even__ var, it does not seem to work at all. I am using it to shade every other row of a large table of data. SO I alter the class of the <tr> tag : <tr<TMPL_IF NAME="__odd__"> class="row_table"</TMPL_IF>> works fine. <tr<TMPL_IF NAME="__even__"> class="row_table"</TMPL_IF>> has no effect. Thanks for a marvelous package, Lars
In case you're interested in tracking down a 2+ year old bug, can you provide a complete test case? __even__ works for me - see t/13-loop-context.t which is passing. On Thu Oct 24 22:34:40 2013, larslemberg@gmail.com wrote: Show quoted text
> I notice that in the documentation, the example code for the __even__ > loop_context_var accidentally refers to __odd__ instead. Additionally, the > __odd__ loop_context_var works perfectly for me, but if I edit my code to > use the __even__ var, it does not seem to work at all. > > I am using it to shade every other row of a large table of data. SO I alter > the class of the <tr> tag : > > <tr<TMPL_IF NAME="__odd__"> class="row_table"</TMPL_IF>> works fine. > > <tr<TMPL_IF NAME="__even__"> class="row_table"</TMPL_IF>> has no effect. > > Thanks for a marvelous package, > Lars