[ZPT] Re: accessing zsql result object in a zpt via traversal

Mark Bronstein mark at bronsteinlaw.com
Tue Sep 9 12:21:28 EDT 2003


Dieter Maurer wrote:
> 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

Thanks!





More information about the ZPT mailing list