[ZPT] Re: ZPT and getting at properties of another doc...

Evan Simpson evan@zope.com
Thu, 07 Feb 2002 10:44:34 -0500


jules wrote:
> Just in case somebody does stumble over this in the archives, 
> this works:
> 
> <span tal:replace=
> "python:getattr(here.SomeFolder[someKey],'someProperty')">

Is 'somekey' a variable?  If so, you should be able to use:

tal:replace="python:path('here/SomeFolder/%s/someProperty' % somekey)"

>>How, though, can I get at the properties of the doc? "here/
>>SomeAcquiredFolder/Doc/PropertyField" would be nice but 
>>doesn't work (probably for some reason I don't understand!). 

This ought to work.  What goes wrong?

Cheers,

Evan @ Zope