[Zope] context switch calling a ZPT from a ZPT

martin f krafft madduck at madduck.net
Mon Feb 7 18:58:01 EST 2005

I have a CMF type 'foo' associated with foo_view template. Thus,
when an instance of the type 'foo' is viewed, foo_view is called,
and the instance is available to the template in the 'here'

My problem is that parts of the foo_view template are rendered by
another ZPT, which I call from foo_view like so:

  <metal:section replace="python:here.foo_section(section='research')" />

Within foo_section, I need to access the instance of type 'foo'.
However, the 'here' and 'context' variables both reference the
foo_view template object rather than the context object on which the
template was invoked.

Is this expected?
How can I get the instance object within foo_section? I tried
passing it (with nocall), but then I get various other errors.

Thank you for any comments.

martin;              (greetings from the heart of the sun.)
  \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net at madduck
invalid/expired pgp subkeys? use subkeys.pgp.net as keyserver!
spamtraps: madduck.bogus at madduck.net
"men always want to be a woman's first love.
 women have a more subtle instinct:
 what they like is to be a man's last romance."
                                                        -- oscar wilde
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://mail.zope.org/pipermail/zope/attachments/20050208/90d0f058/attachment.bin

More information about the Zope mailing list