[Zope] how to call sequence-item

2000-10-10 Thread Joachim Schmitz

Hello,

I'm using the photo-product, when one has created a photo-instance "image"
you can render this like so:

dtml-var "image(display='thumbnail')"

now I wanted to loop over all photos in a folder "Images" and did:

dtml-with Images
dtml-in "objectItems('Photo')"
dtml-call "REQUEST.set('bild',_['sequence-item'])"
dtml-var bildbr
/dtml-in
/dtml-with

that displays all photos in their original size, but

dtml-var "bild(display='thumbnail')" 

gives:

Error Type: TypeError
Error Value: call of non-function (type string)

how can I call a sequence-item ?


Mit freundlichen Grüßen

Joachim Schmitz  

  
AixtraWare, Ing. Büro für Internetanwendungen
Hüsgenstr. 33a, D-52457 Aldenhoven  
Telefon: +49-2464-8851, FAX: +49-2464-905163


___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )




Re: [Zope] how to call sequence-item

2000-10-10 Thread Chris Withers

Joachim Schmitz wrote:
 dtml-call "REQUEST.set('bild',_['sequence-item'])"

Here's your problem, thanks to _'s 'itneresting' implementation of
__getitem__...

...what you really want is:

dtml-call "REQUEST.set('bild',_.getitem('sequence-item',0))"

cheers,

Chris

___
Zope maillist  -  [EMAIL PROTECTED]
http://lists.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://lists.zope.org/mailman/listinfo/zope-announce
 http://lists.zope.org/mailman/listinfo/zope-dev )