[Zope] Acquire/call script on object in ZPT repeat

Dieter Maurer dieter@handshake.de
Sun, 12 May 2002 20:39:58 +0200


Gromoll, C. writes:
 > ...
 > I'd like to call a particular script root/scripts/action on EACH
 > object from the list mylist, which contains a list of folders located 
 > throughout the zope tree. I've tried variations on the following ZPT code, 
 > none of which work:
 > 
 > <p tal:repeat="object mylist">
 > <div tal:content="object/scripts/action">Result of calling action on
 > object</div>
 > </p>
<p tal:define="action nocall:object/scripts/action"
   tal:repeat="object mylist">
   <div tal:content="python: action(object)"></div>
</p>

This assumes, that the script expects "object" as argument.


Dieter