[Zope] How to define variables inside a loop in Zope Page Template

Andreas Jung Andreas Jung" <andreas@andreas-jung.com
Sat, 4 Aug 2001 07:35:53 -0500


>From Evans ZPT article:


The order in which you write TAL attributes on a tag does not affect the
order in which they execute. No matter  how you arrange them, the TAL
statements on a tag always execute in the following order: define,
condition,
repeat, content / replace, attributes.

So in your case you must define 'header' inside the repeat block.

Andreas

----- Original Message -----
From: "Dirksen" <dirksen_lau@yahoo.com>
To: <zope@zope.org>
Sent: Samstag, 4. August 2001 06:30
Subject: [Zope] How to define variables inside a loop in Zope Page Template


> Hi,
>
> Why this line doesn't work?
> <span tal:repeat="item here/objectValues" tal:define="header item/title">
>
> It complains unable to fine 'item'.
>
> Cheers
> Dirksen
>
> __________________________________________________
> Do You Yahoo!?
> Make international calls for as low as $.04/minute with Yahoo! Messenger
> http://phonecard.yahoo.com/
>
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://lists.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://lists.zope.org/mailman/listinfo/zope-announce
>  http://lists.zope.org/mailman/listinfo/zope-dev )
>