I'm trying to apply some css classes to alternate rows in my table.
According to the PHPTAL manual, you can use this:

tal:attributes="class php: repeat.ranking.odd ? 'odd' : NULL"

It works fine, but there's a better way suggested using a custom modifier:

tal:attributes="class css-odd:repeat/ranking/odd"

Now, I have no idea how to go about writing this custom modifier.
First, I don't think the name `css-odd` will work since you can't name a php function like so:

function phptal_tales_css-odd($src, $nothrow) {}

But this is not the problem (you can change the modifier name...).
In fact, I'm not quite sure what the body of this function should be like.

Panorama Internetu - prognoza pogody, poczta e-mail, SMS, wyszukiwarki: Gooru, 
Anonser, serwisy: randki, ogl‚oszenia, wakacje, program TV, Kina,  muzyka, DVD, 
newsy, inne.
http://www.panoramainternetu.pl/ (http://www.epf.pl/)

PHPTAL mailing list

Reply via email to