[Zope] How does one refer to the root folder?

Kevin Dangoor kid@kendermedia.com
Thu, 16 Mar 2000 09:26:41 -0500


----- Original Message -----
From: "Andres Corrada-Emmanuel" <andres@mail.mamey.com>
To: <zope@zope.org>
Sent: Thursday, March 16, 2000 1:12 AM
Subject: [Zope] How does one refer to the root folder?


> Does one call it "PARENTS[-1]"? I'm trying to get an attribute of the root
folder and I'm failing with the syntax-
> <dtml-with "rootObject=_.getitem('PARENTS[-1]')">
> I now that the failure is because the object in the namespace is
"PARENTS". So what is the name of the root folder?

The root folder can indeed be accessed by PARENTS[-1].

<dtml-with "PARENTS[-1]">

is all you need.

Keep in mind also that if the property of the root folder you're trying to
get at has a unique name, you can get to it via acquisition. (If the
property is called "foo", <dtml-var foo> would look up the property and find
it, all the way at the root.)

Kevin