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