[Zope] Zope Object Contexts and Acquisition
Chris Withers
chrisw@nipltd.com
Wed, 27 Feb 2002 12:49:19 +0000
"Timo A. Hummel" wrote:
>
> > ><dtml-in expr="getPhysicalRoot().objectValues(['Folder'])">
> > > <some output code>
> > ></dtml-in>
>
> When you call the code above in a DTML-Method in your root folder,
> it lists all the directories in the root. So far so good. Let's say
> you want to restructure your zope project and move everything from
> the root into /site1, so you will have these results:
>
> /site1/theobjectValuesDTMLMethod
> /site1/folder1
> /site1/folder2
Well, if you do this, then you'll want to change getPhysicalRoot() either to
site1, if site1 is a unique name, or restrictedTraverse('/site1') if it's not.
Incidentally, I have a suspicion that you may not understand acquisition,
especially in the context of a Zope 2 application, as fully as you think you do.
Be careful, it'll bite you if you're not careful.
cheers,
Chris