[Zope] calling ZPT from ZPT and passing namespace

Dieter Maurer dieter@handshake.de
Tue, 30 Oct 2001 23:20:37 +0100 (CET)


=?iso-8859-1?Q?Juan=5FCarlos=5FCoru=F1a?= writes:
 > I'm trying to call a Zope Page Template object from within another Zope Page
 > Template and I wish to pass it the whole namespace of the calling ZPT.
ZPT wants to restrict the magic....

  Therefore, this is not possible, at least not directly...

  You can obtain it indirectly though a DTML object.

  ZPT "z1" calls an intermediate DTML object "d".
  Its namespace contains all of "z1"'s variables.
  "d" calls "z2" and passes "_" as keyword parameter, say
  "context". Then "z2" can use "options['context']" (Python)
  or "options/context" (path expression) to access "z1"'s
  namespace...
  

Dieter