[Zope] Calling a page template from a DTML document

Andreas Jung lists at andreas-jung.com
Sat Jun 4 09:21:55 EDT 2005



--On 4. Juni 2005 14:03:16 +0100 John Poltorak <jp at warpix.org> 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 186 bytes
Desc: not available
Url : http://mail.zope.org/pipermail/zope/attachments/20050604/63e90e4e/attachment.bin


More information about the Zope mailing list