[Zope] sequence-item is called in dtml-let assignment?

Chris Withers chrisw@nipltd.com
Thu, 28 Sep 2000 11:42:05 +0100


seb wrote:
> If you do:
> 
> <dtml-in "objectValues('Foo Thing')">
>         <dtml-let thing=sequence-item>
>                 <dtml-var "thing.id()">
>         </dtml-let>
> </dtml-in>
> 
> You get TypeError: it claims thing is a string, so you can't perform any
> kind of function call against it.

Welcome to DTML...

what's happening, I guess, is that when you do 
<dtml-let thing=sequence-item>

sequence-item is called (and hence rendered to a string) which screws
thigns up.

try:
> <dtml-in "objectValues('Foo Thing')">
>         <dtml-let thing="_.getitem('sequence-item',0)>
>                 <dtml-var "thing.id()">
>         </dtml-let>
> </dtml-in>

cheers,

Chris