[ZPT] accessing zsql result object in a zpt via traversal
Dieter Maurer
dieter at handshake.de
Tue Sep 2 21:44:39 EDT 2003
Mark Bronstein wrote at 2003-9-1 21:45 -0400:
> ...
> But when I try to use a page template instead, ie,
> http://zoperoot/zsqlmethod/45/viewrecord.zpt
>
> I cant figure out how to access the fields. in my tal:content
> statements. I've tried result/fieldname, result/form/fieldname,
> result/options/fieldname etc. Can someone help?
Whenever you call a PageTemplate via an URL of the form
"URL-To-obj/template",
then "obj" is accessible in "template" as "here".
In your special case, you can use e.g. "here/fieldname".
Read the Zope Book about Page Templates. "here" refers
to the object to be presented in more cases than the above
mentioned.
Dieter
More information about the ZPT
mailing list