Kornel Lesiński <kor...@...> writes:

> On 10-12-2009 at 14:32:58 Bas <kooy...@...> wrote:
> > 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">
> tal:condition is evaluated before tal:repeat. In XML order of attributes  
> in the source code doesn't matter, so TAL has to have hardcoded order. TAL  
> "sees":
> <tal:block tal:condition="not:item/someBooleanVar">
>    <tal:block tal:repeat="item itemList">
>      <tr>
>      …
> Which results in condition accessing variable which doesn't exist yet.

I knew the order of the attributes wouldn't matter, I was just confused and 
thought variables declared in a tag would be available in that tag. This does 
make sense however, in order to start the repeat the condition has to be 


PHPTAL mailing list

Reply via email to