[Zope] Accessing root folder from PythonMethods

Evan Simpson evan@tokenexchange.com
Thu, 11 Nov 1999 10:49:18 -0600


From: Itamar Shtull-Trauring <itamars@ibm.net>
> I want to be able to access the root folder of Zope from a PythonMethod -
is
> there any easier way than just going up a chain of aq_parent till you hit
> the end (what's aq_parent then, None?)?

Try REQUEST.PARENTS[-1].  The following code lists the contents of the root
folder, for example:

<params>self, REQUEST</params>
return REQUEST.PARENTS[-1].objectIds()

Cheers,

Evan @ 4-am