[Zope] RE: tal:repeat usage

Andrew Athan zope_list_replies@memeplex.com
Tue, 5 Nov 2002 14:49:59 -0500


Evan:

This, unfortunately, does not work.  It yields the error "global name 'a' is
not defined"

The issue is that dictionary keys do not seem to be traversible as
attributes.  So what I need to be creating in the tal:define is a dictionary
that has a __getattr__ function I guess??

A.

-----Original Message-----
From: Evan Simpson [mailto:evan@4-am.com]
Sent: Tuesday, November 05, 2002 2:19 PM
To: Andrew Athan; zope@zope.org
Subject: Re: tal:repeat usage


Andrew Athan wrote:
> <span tal:define="global foo python:[{'a':1},{'a':2}]"></span>
>
> <span tal:repeat="v foo">
>   <span tal:content="repeat/v/a"></span>
> </span>

Use "v/a" instead of "repeat/v/a".

Cheers,

Evan @ 4-am