[Zope] Question about Page Templates & DTML Document

sean.upton@uniontrib.com sean.upton@uniontrib.com
Thu, 02 Jan 2003 12:55:49 -0800


1. You can't use the URL as the way to include the DTML method rendering in
your ZPT.  You actuially need to call the method in the context of some
namespace.  You actually need to get to (traverse to and obtain) the method
object and call it via tal:content or similar within the page template.
Assuming the DTML method is in the same folder, here/MyMethodName is what
you would use in TAL to obtain it and call it.

2. You can include content generated by a DTML method inside a page template
like this:

<span tal:replace="structure here/myDTMLMethod">Contents Go Here</span>

The structure at the beginning of the statement above makes sure that the
results are not HTML-escaped, because it is quite likely the DTML method is
returnning stuff that is already HTML formatted, not plain text...

Sean

-----Original Message-----
From: Martin Koekenberg [mailto:zope@digital-adventures.nl]
Sent: Thursday, January 02, 2003 12:27 PM
To: zope@zope.org
Subject: [Zope] Question about Page Templates & DTML Document


Hello,

This will be a newbe question.

I've a number of DTML Documents (News items) And a Page Template (Layout 
News item)

How can I load a dtml document in a Page template by using the URL to 
specify the dtml Document...

www.domain.com/newstemplate?newsitem_01

Who can help me ?

Thanks !!!


Martin Koekenberg


_______________________________________________
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 )