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 bild><br> </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
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
participants (2)
-
Chris Withers -
Joachim Schmitz