[Zope] this(), parent(), etc.
Kent Polk
kent@goathill.org
Mon, 8 Feb 1999 17:31:09 -0600 (CST)
Ok. I've gotten myself pretty confused now.
Given a dtml method in a folder containing :
<!--#var this-->, which correctly identifies the parent
folder, yet if I call this() indirectly, from another dtml
method, I get a KeyError: this
So then I call the second dtml method using (parent=this,...
which contains:
<!--#var parent-->, which provides the correct object instance.
However, when I try to <!--#var "_.getattr(parent ...
I get a failed authorization even though I am using the
Manager role...
Why does an indirectly referenced dtml :
1) not know who it's parent object (folder) is through this()?
2) fail an authentication when accessing the parent object when
passed as a parameter when it has permission.
Note this problem only exists when the send dtml method is
indirectly referenced. If it is called directly, this(), etc
work fine. So what's the problem with indirection?
Or how can I obtain a usable parent object from within
an indirecatly referenced dtml method for use with getattr()?
Thanks
Kent