[Zope] parsing dtml from sql-method

Dieter Maurer dieter@handshake.de
Wed, 31 Jan 2001 21:23:22 +0100 (CET)


Ralf Kraemer writes:
 > i would like to put some dtml code into my database
 > and let it be parsed by zope by a  query.
 > 
 > it works fine with html, but with dtml it fails 
 > 
 > actual i have some
 > 
 > <dtml-in get_item(item_id)>
 > <dtml-var item>
 > </dtml-in>
 > 
 > can anybody help me ???
It will not work in DTML, but in an external Python Method:

  you take your DTML string (stored in the database)
  and create a document template object from it.
  You then render (call) this object.

  For how, you do all that, you should look at the
  "DocumentTemplate" package in your Zope distribution.
  Most relevant "DT_String.py" and "DT_HTML.py".


Dieter