[Zope-PTK] Access "top" object without passing it as argument to method?

Sigve Tjora sigve@tjora.no
Tue, 27 Feb 2001 23:36:40 +0100 (CET)


Hi!

I am developing a tool and want to read some properties from the object
being read by the browser.

Is there a easy way to do this in python?

If some of my dtml-code functions call
<dtml-var "portal_mytool.myMethod()">
then how can myMethod get a reference to the the object on the top (or is
it named the bottom?) of the aqusition-stack, and then travers the stack
just as normally would have been done looking for a attribute?

E.g. if a object in http://myserver/portal/folder1/folder2/object
calls portal_mytool.myMethod(), how can this method travers object,
folder2, folder1 and portal (in that order) to find an attribute?

thanks in advance!

mvh Sigve Tjora