[Zope] Calling external methods with the current object

Martijn Faassen m.faassen@vet.uu.nl
Thu, 12 Aug 1999 15:11:35 +0200


Hi there,

I keep running into variations of this problem. I want to call an
external method and pass the 'self' object (and REQUEST) to it, but
explicitly. But still the *current* self.

So I have an external method like this:

def foo(self, REQUEST):
   pass

The Advanced DTML Howto mentions this:

----
Variable rendering

The DTML var tag does not merely lookup variables, but it "renders"
them. The process of rendering is not just coercing objects into
strings, but calling objects if they are callable, and handling DTML
objects specially. Zope's rendering rules are designed to do what Zope
thinks is the right way to display an object. However, you may not
always want to let Zope render and object automatically.

For example, Zope normally renders DTML objects referred to in other
DTML objects by calling them the with current DTML namespace stack.
----

And then it goes on how to call it with *other* DTML namespace stacks.
But how do I refer to the current DTML namespace stack explicitly?
'self' in DTML doesn't work.

Regards,

Martijn