On 28-04-2009 at 11:45:43 Julian Haupt <julian.ha...@hauptmedia.de> wrote:

<tal:block tal:repeat="c categories">
    <option tal:attributes="value c/id; selected condition: c.active|
string:selected|not:true" tal:content="c/category"></option>

This is unnecessary.

If boolean value is available in the model, you don't need such modifier at all:

<option tal:attributes="value c/id; selected c/active" tal:content="c/category" 

PHPTAL recognizes attributes like checked/selected/readonly and translates 
boolean value to appropriate value automatically.

Also, instead of 'not:true' you could use 'nothing'.

regards, Kornel

PHPTAL mailing list

Reply via email to