Hi, Rafał Miłecki wrote: > I wish to add some text after third (and later after every third) > element in my list. > > <tal:block tal:repeat="item lista"> > <p tal:content="item/content">Place for content</p> > <div tal:condition="php: repeat/item/number==3">--BREAK--</div> > </tal:block> > > <tal:block tal:repeat="item lista"> > <p tal:content="item/content">Place for content</p> > <div tal:condition="php: repeat/item/number%3==0">--BREAK--</div> Try changing repeat/item/number to repeat.item.number or repeat().item().number()
Regards, tarjei > </tal:block> > > But it causes error "Unable to find path number in current scope". Is > this possible to make such a condition? > > I know I could generate in PHP something like item/isThird but I wish > to keep my PHP code clean from such hacks. > > > > ------------------------------------------------------------------------ > > _______________________________________________ > PHPTAL mailing list > [email protected] > http://lists.motion-twin.com/mailman/listinfo/phptal _______________________________________________ PHPTAL mailing list [email protected] http://lists.motion-twin.com/mailman/listinfo/phptal
