Re: [htmltmpl] extended TMPL_IF / UNLESS syntax
Brought to you by:
samtregar
From: Pat 'h. W. <li...@ha...> - 2004-02-23 14:28:36
|
Philip S Tellis wrote: > Sometime on Feb 19, Puneet Kishor assembled some asciibets to say: > > >>never be possible (alternating colored rows in a table), and some > > > <td class="<tmpl_if __ODD__>odd</tmpl_if>row"> blah </td> > I do something similar but I just pass one of 2 classes through with the hash to H::T. So each row has a class like this, <tr class="<tmpl_var name="CLASS">"><td></td></tr> That way each row has a class defined either way be it odd or even and I can customize it all in CSS later. In NS4 and crummier browsers you'd probably have to pass it to each <TD> Of course this makes me have to figure odd and even rows out in the perl side but it also opens up to having more then 2 alternating row definitions if needed. Having moved to Coldfusion shop I really miss all the separation that H::T forced you into. It makes Templates so much easier to work with. --Pat -- "You cannot kick like me, Can't be the Kicker I am" -- Thulsa Doom ----------------------------------------- pat at hakjoon dot com |