Re: [Zope] Calling a page template from a DTML document
On Fri, Jun 03, 2005 at 11:26:40AM -0500, J Cameron Cooper wrote: John Poltorak wrote: Is there any way of getting a DTML document to use a page template to build part of a page? Some sample code would be handy as an illustration if what I want to do is possible. Just call it exactly like you might do with, well, anything else:: dtml-var somepatetemplate Did you try this? Not until you suggested it. I'm a bit of a slow learner, and there is so much to learn... Next I have to figure out how to pass parameters to the template. --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Calling a page template from a DTML document
--On 4. Juni 2005 14:03:16 +0100 John Poltorak [EMAIL PROTECTED] wrote: On Fri, Jun 03, 2005 at 11:26:40AM -0500, J Cameron Cooper wrote: John Poltorak wrote: Is there any way of getting a DTML document to use a page template to build part of a page? Some sample code would be handy as an illustration if what I want to do is possible. Just call it exactly like you might do with, well, anything else:: dtml-var somepatetemplate Did you try this? Not until you suggested it. I'm a bit of a slow learner, and there is so much to learn... By passing parameters as keyword argument to the template and accessing them within the template through the 'options' namespace (as documented in the Zope Book) or by taking the parameters from the REQUEST (everything's in the Zope Book). -aj pgpJ7RLh2r28V.pgp Description: PGP signature ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Calling a page template from a DTML document
On 04.Jun 2005 - 14:03:16, John Poltorak wrote: Next I have to figure out how to pass parameters to the template. Read the other answer to your question... Andreas -- You'll be called to a post requiring ability in handling groups of people. ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
[Zope] Calling a page template from a DTML document
Is there any way of getting a DTML document to use a page template to build part of a page? Some sample code would be handy as an illustration if what I want to do is possible. -- John ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Calling a page template from a DTML document
John Poltorak wrote: Is there any way of getting a DTML document to use a page template to build part of a page? Some sample code would be handy as an illustration if what I want to do is possible. Just call it exactly like you might do with, well, anything else:: dtml-var somepatetemplate Did you try this? --jcc -- Building Websites with Plone http://plonebook.packtpub.com/ ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )
Re: [Zope] Calling a page template from a DTML document
John Poltorak wrote at 2005-6-3 14:03 +0100: Is there any way of getting a DTML document to use a page template to build part of a page? Sure: it calls the template. Some sample code would be handy as an illustration if what I want to do is possible. Assume template is a template acquirable from the DTML objects context. Then dtml-var template will render template. When you want to pass arguments to template, this looks like dtml-var expr=template(a1, a2, ..., kw1=v1, kw2=... ) The arguments are available in template via the predefined variable options. The Zope Book tells you more... As you (hopefully) see: you use page templates in DTML like any other (callable) object. -- Dieter ___ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )