[Zope] Question about Page Templates & DTML Document

Kevin Carlson khcarlso@bellsouth.net
Thu, 2 Jan 2003 17:44:01 -0500


I have done this from a python script so this may help.  If your DTML
Document id is passed in the request as docID and is contained in the same
calling context as your template, you could try call the script like this:

http://localhost:8080/newstemplate?docID=blahblahblah

The script would then get the document as follows:

  docID = request.get('docID')
  doc = context[docID]
  return doc()

Of course, that's from a script so you'll have to modify it for a template.
Also,  HTML tags will not render correctly but dtml tags will.  You'll have
to call Globals.HTML() and pass the document contents as a parameter to make
this happen.  There was a thread on the list a while back about this.

Hope that helps,

Kevin

-----Original Message-----
From: zope-admin@zope.org [mailto:zope-admin@zope.org]On Behalf Of
Martin Koekenberg
Sent: Thursday, January 02, 2003 3: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 )