[Zope] iterating over different objects in a folder

Gabriel Genellina gagenellina at softlab.com.ar
Mon Dec 29 17:58:22 EST 2003


At 29/12/2003 22:08, you wrote:

>Is there an easy way to itterate over the contents of a folder, but 
>returning a single, combined list of files, dtml documents and images?  A 
>bit like this...
>
><dtml-in expr="objectValues('DTML Document'[or]'file'[or]'image')">

Just pass a list of meta_types: objectValues(['DTML Document', 'File', 
'Image'])

>And if I can get such a list is there a way to test the items to see which 
>type they are so I can display them (or, for files, links to them) 
>appropriately?

Try: object.meta_type


Gabriel Genellina
Softlab SRL




More information about the Zope mailing list