On 25-11-2009 at 11:35:43 Werner <li...@mollentze.co.za> wrote:

Simply because it allows for multiple modifier parameters (of which some can be optional), which in turn can allow for more flexibility in certain kinds of modifiers, e.g:

<tal:block tal:content="fullName:name/title,name/first,/name/last"></tal:block>

That is possible currently:

function phptal_tales_fullname($expr)
        foreach(explode(',',$expr) as $subexpr) …

But that's a separate modifier. What I'm talking about is modification of the default path: modifier (which is the default).

I think that is intuitive to someone who knows TALES and PHP:

tal:attributes="selected current/id == selected_id"

The goal is to free users from having to write many modifiers, especially for common and trivial cases, and to provide something generic and intuitive instead.

If you want to repeat table headers every 5 rows, what would you do?

<tr tal:condition="repeat/row/index mod 5 == 0">

Should PHPTAL come with dozens of built-in modifiers?

<tr tal:condition="on-every-nth:5,repeat/row/index">

regards, Kornel

PHPTAL mailing list

Reply via email to