try this ExternalMethod.. def recurseZopeFolder(zopeObject): """ get all urls of subObjects from the givem object (used with getAllSubObjectUrls)""" urls = [] for obj in zopeObject.objectIds(): # if not re.compile("^_.*$").match(obj) != None : a = zopeObject._getOb(obj) if a.isPrincipiaFolderish: urls = urls + recurseZopeFolder(a) else: newUrl = '' for b in a.getPhysicalPath(): newUrl = newUrl + '/' + b urls.append(newUrl) newUrl = '' for b in zopeObject.getPhysicalPath(): newUrl = newUrl + '/' + b urls.append(newUrl) return urls -- Srinath Mantripragada srinath.man@cpm.com.br -- Srinath Mantripragada srinath.man@cpm.com.br
-----Original Message----- From: Bill Anderson [mailto:bill@libc.org] Sent: quinta-feira, 29 de março de 2001 17:32 To: zope@zope.org Subject: Re: [Zope] folders recursively
On 29 Mar 2001 16:10:22 +0200, Petr Knapek wrote:
Hi Zopists,
I would like to call some DTML method on all Folders in my ZODB. I think the best way should be recursion but I do not know how to do it in DTML.
Don't do it with DTML use a Python Method/Script.
Bill
_______________________________________________ Zope maillist - Zope@zope.org 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 )
participants (1)
-
Srinath Mantripragada