Well I just looked at "Using Zope Page Templates" and "Advanced Page Templates" and "Appendix C", and although "context" is mentionned many times (And I of course knew about that one!) it's all in the context of TAL/TALES, which is a different beast than a code level FSPageTemplate instance. My FSPageTemplate instance doesn't seem to have a "context" attribute/property or method. I've dir()'ed it, but don't see anything that jumps out at me as being useful for what I'm trying to do. Thanks, J.F. -----Original Message----- From: Andreas Jung [mailto:lists@zopyx.com] Sent: September 20, 2007 09:50 To: Doyon, Jean-Francois; Andreas Jung; zope@zope.org Subject: RE: [Zope] PageTemplate API Question --On 20. September 2007 09:42:50 -0400 "Doyon, Jean-Francois" <jdoyon@NRCan.gc.ca> wrote:
obj = request['PUBLISHED'] print repr(obj)
<FSPageTemplate at /atlas/maptext_view used for /atlas/maps.mtp/environment.mtp/seaice.mtp/break-up.thm/1.mtx>
I have the FSPageTemplate ... It's being applied to "1.mtx".
How do I get to "1.mtx" directly, getting rid of the Page Template?
I want to end up with this object:
<MapTopicText at /atlas/maps.mtp/environment.mtp/seaice.mtp/break-up.thm/1.mtx>
I want to get to the object the template is being applied TO.
You might read my first reply carefully :-) I told you about the 'context' object as it is present within your ZPT. The 'context' object *IS* the object you are talking about. (for further details -> The Zope Book with its three ZPT chapters) -aj