[Zope] Zope Object Contexts and Acquisition

Timo A. Hummel timo.hummel@gmx.net
Tue, 26 Feb 2002 19:24:14 +0100


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>

So if we call buildMenu from the root, it works as expected, and
renders: 

folder1 folder2 folder3

But when called from folder1, it renders nothing, since there are no
folders. But the question is: Is it possible to tell objectValues that
it should perform relative to the "buildMenu" method rather than using
the parent object (for example, index_html in folder1?). Of course,
having a PARENTS[-1] is a workaround, but not a real solution. Is there
a possibility to tell objectValues WITHOUT an absolute reference to
something that it should work relative to buildMenu?

Best regards,
Timo

--
Timo A. Hummel, Head of Monday Recordings
Monday Recordings						Phone :
+49 (0)69 460 940 80
P.O. Box 17 05 35						Fax   :
+49 (0)69 460 940 81
60079 Frankfurt						E-Mail:
timo@monday-rec.com
GERMANY							Web   :
http://www.monday-rec.com