3 Nov
2003
3 Nov
'03
7:15 p.m.
On Mon, Nov 03, 2003 at 04:52:38PM +0100, Kai Vermehr wrote:
From the Zope book I have this little script which returns a list of any images from the folder where it is called.
return container.objectValues(['Image'])
how can I modify it so it also searches for images inside Subfolders?
try the ZopeFind method: images = container.ZopeFind(container, obj_metatypes=['Image']) However, if you do this a lot, you will find it a lot faster to use the Catalog instead of ZopeFind.
and how would I ask for their URLs?
use the absolute_url method: urls = [img.absolute_url() for img in images] -- Paul Winkler http://www.slinkp.com Look! Up in the sky! It's ALMIGHTY CHICK! (random hero from isometric.spaceninja.com)