[Zope] Zope Object Contexts and Acquisition

Chris Withers chrisw@nipltd.com
Tue, 26 Feb 2002 19:45:21 +0000


"Timo A. Hummel" wrote:
> 
> Hi all,
> 
> I know that this topic has been rolled up several times, but I've only
> found rather "bad" examples. Imagine a simple site:
> 
> /folder1
> /folder2
> /folder3/folder4
> 
> We also the method "buildMenu" in the root:
> 
> <dtml-in expr="objectValues(['Folder'])">
> <some output code>
> </dtml-in>

try this:

<dtml-in expr="getPhysicalRoot().objectValues(['Folder'])">
 <some output code>
</dtml-in>

of course, if you used Python Scripts and ZPT, you probably wouldn't have this
problem since they're a bit more clued about the location of themselves by way
of the 'container' variable in Python Scripts and the 'script' variable in ZPT.

cheers,

Chris