I think to recall that I could do zebra striping with TAL using something like this:
<tr tal:repeat="item list" class="row${repeat/item/odd}"> </tr> That should give you class names of 'row0' and 'row1', which you can style with CSS. Not the cleanest solution but it did the job. /imv On Thu, Jan 8, 2009 at 10:47 PM, Trent Moyer <tmo...@symons.com> wrote: > I recently started using PHPTAL and it has proven very useful. However, I > am > having some trouble with the custom modifiers. I would like to use the > following > or something similar: > > <tr tal:repeat="item list" tal:attributes="class alt:repeat/item/odd | > nothing"> > ... HTML Code ... > </tr> > > The intent is to make every other row have a class="alt". > > This is my code for the modifier: > > function phptal_tales_alt( $src, $nothrow ) > { > $src = trim($src); > return '( '.phptal_tales($src, $nothrow)." ? 'alt' : null )"; > } > > The problem that I am having is that this modifier and the example modifier > given in the PHPTAL documentation do not work when used with multiple > options (a > | b | c). The code returned by phptal_tales_alt() is "( Array ? 'alt' : > null )". > > I would like to know the simplest code to add class="alt" to every other > row > without setting the other rows to class="", and/or how to code a modifier > to > behave with multiple options. > > > _______________________________________________ > PHPTAL mailing list > PHPTAL@lists.motion-twin.com > http://lists.motion-twin.com/mailman/listinfo/phptal >
_______________________________________________ PHPTAL mailing list PHPTAL@lists.motion-twin.com http://lists.motion-twin.com/mailman/listinfo/phptal