[ZPT] Re: [Zope-dev] ZPT 1.2, TAL 1.2, ZTUtils 1.0 Released

Evan Simpson evan@digicool.com
Sun, 29 Apr 2001 15:19:48 -0500


From: "Frank Sonnemans" <fs.mail@wanadoo.be>
> This update breaks my previously working code. My site master template
> calls a dtml component to render a simple menu. This worked with the
> previous release of ZPT, but now results in a Name Error for the
PARENTS[]
> variable. What changed in the new release to cause this and how are we
now
> supposed to call dtml-components to avoid this problem. (Output Trace,
> dtml-code and object call syntax below)

The most reliable way to call DTML from ZPT is using a Python
expression, so that you can explicitly pass the client object and
request mapping.  Try something like this:

tal:define="result here.my_dtml(None, request)"

or

tal:define="result here.my_dtml(here, request)"

The problem that you're having is a change in the implicit DTML call
code to make ZPT variables available to called DTML code.

Cheers,

Evan @ digicool