[Zope] dtml-var question

Pavlos Christoforou pavlos@gaaros.com
Mon, 21 Feb 2000 17:43:14 -0500 (EST)


On Mon, 21 Feb 2000, Jeff K. Hoffman wrote:

> >   <dtml-var expr="foo(_.None, _, REQUEST)">
> > 
> > is closer?
> 
> Or maybe <dtml-var expr="foo(this(), _, REQUEST)"> is closer.
> 

IMO the exact equivalent is:
<dtml-var expr="foo()">
or <dtml-var "foo()">

in both cases and the original one <dtml-var foo> the ZPublisher mechanism
will take care to pass the right arguments (and the same set of arguments)
to the method.

However if you are looking to 'render' the method in the context of the
current folder then you could simply do:

<dtml-var "_.render(foo)">

and don't worry about client objects etc. For more complicated
situations you might need to pass the client object explicitly.

Pavlos