[PHPTAL] Variable access in tal:repeat
Fabian Deutsch
fabian.deutsch at gmx.de
Thu Dec 10 15:37:46 CET 2009
Am Donnerstag, den 10.12.2009, 14:32 +0000 schrieb Bas:
> If I create the following construct in a template PHPTal will throw an
> error,
> saying that the variable item cannot be found:
>
> <tr tal:repeat="item itemList"
> tal:condition="not:item/someBooleanVar">
>
did you try:
<tr tal:repeat="item itemList"
tal:condition="not:repeat/item/someBooleanVar">
-fabian
> The following, however, works just fine:
>
> <tr tal:repeat="item itemList" tal:attributes="item
> sf/someBooleanVar">
>
> I realise I can do this, to gain access to the variable anyway:
>
> <tal:block tal:repeat="item itemList">
> <tr tal:condition="not:item/someBooleanVar">
> </tal:block>
>
> But I would like to know the reasoning behind why the variable is not
> available
> in the tal:condition attribute while it is available in
> tal:attributes. Is this
> a bug perhaps?
>
>
>
>
>
>
>
> _______________________________________________
> PHPTAL mailing list
> PHPTAL at lists.motion-twin.com
> http://lists.motion-twin.com/mailman/listinfo/phptal
More information about the PHPTAL
mailing list