Re: Newbie questions: Calling PageTemplates from Python, and getting meta-info on ZSQL method results
Leeuw van der, Tim wrote:
2. How can I find out the fields which are in the resultset of a ZSQL method, using either Python or PageTemplates?
I have an example of how to do it in: http://www.zope.org/Members/ielbert/zsql2zpt
Rather than pass parameters to a calling page, do this in the script. REQUEST.set("option1", "value1") container.mainPageTemplate() Now these values have session scope. In mainPageTemplate you can have the replace statement: <strong tal:content="request/option1" >data to replace</strong> Or to get fancier: Lets say you go two templates deep so that you have modular page templates <span tal:replace="container/InnerTemplate" >replace block </span> and inside InnerTemplate you have: <strong tal:content="request/option1" >data to replace</strong> This works because option1 has request scope. ----- Original Message ----- From: "Igor Elbert" <ielbert@genuone.com> To: <tim.leeuwvander@nl.unisys.com> Cc: <zope@zope.org> Sent: Thursday, August 08, 2002 11:06 AM Subject: [Zope] Re: Newbie questions: Calling PageTemplates from Python, and getting meta-info on ZSQL method results
Leeuw van der, Tim wrote:
2. How can I find out the fields which are in the resultset of a ZSQL method, using either Python or PageTemplates?
I have an example of how to do it in: http://www.zope.org/Members/ielbert/zsql2zpt
_______________________________________________ Zope maillist - Zope@zope.org http://lists.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope-dev )
participants (2)
-
Edward Ing -
Igor Elbert