[Zope] Re: Passing arguments to a ZPT

Max M maxm@mxm.dk
Sat, 22 Mar 2003 22:17:20 +0100


Johan Carlsson [EasyPublisher] wrote:

> I still have allot of DTML methods that uses variables in the 
> namespace (by passing _.None,_)
> Calling these from ZPT breaks the namespace.
>
> (How) could I send the current namespace to the DTML sub-methods?


You should be able to just pass "here" instead of context or this().

A "full" example of what can be passed should look like this:

<span tal:replace="python:here.dtml_method(here, request, 
title_or_id='Another title')"></span>

Untested from zpt, but that is how it normally looks.

regards Max M