[PHPTAL] Variable access in tal:repeat
Kornel Lesiński
kornel at aardvarkmedia.co.uk
Thu Dec 10 15:43:20 CET 2009
On 10-12-2009 at 14:37:46 Fabian Deutsch <fabian.deutsch at gmx.de> wrote:
> 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">
That wouldn't work. repeat is for metadata about the loop, not for getting
data from variables. Loop variables always work (only work) without
repeat/...
--
regards, Kornel
More information about the PHPTAL
mailing list