[Zope] calling methods for each object in a list

Thomas Weiner weiner@tu-harburg.de
Thu, 30 Mar 2000 20:13:40 +0200


Philipp Dunkel schrieb:
[...]
> 
> when I do a
> 
> <dtml-in ids>
>  <dtml-var sequence-item>
> </dtml-in>
> 
> it prints out the ids of the checked objects fine,
> but when I try a
> 
> <dtml-in ids>
>  <dtml-call "sequence-item.foo">
> </dtml-in>
> 
> he doesn't know sequence-item anymore

No, Zope can't, especially Python can't, because it trys to evaluate
something like sequence - item.foo.

So try

<dtml-with sequence-item>
 <dtml-call "foo">
</dtml-with

or:

<dtml-call "_.['sequence-item'].foo">

hth,
Thomas