iterating over different objects in a folder
Hi I've only just started with zope so I hope these are fairly simple questions... I want to be able to display all the documents, images, and files, in a folder in either date or ID order - (not as separate lists for each type). So: 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')"> 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? thanks, John Grey
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
participants (2)
-
Gabriel Genellina -
john@thegreys.demon.co.uk