Michiel Toneman wrote at 2003-1-22 16:38 +0100:
I'm writing a python product that does some fancy processing of HTML. The problem is that the DTML tag I add to the output of getHTML doesn't get rendered in my DTML Document when I call the object. I'm probably overlooking the obvious, but I'm totally stuck :-S
The code is like:
def getHTML(self): "Returns HTML for page" html = self._htmltxt # do lots of stuff to html here, but just to keep it simple: html += "<p><dtml-var id></p>" return html You must create a "DocumentTemplate.DT_HTML.HTML" instance and then render (i.e. call) it.
Read the section "Calling DTML objects" in <http://www.dieter.handshake.de/pyprojects/zope/book/chap3.html> to call your "HTML" instance correctly. Dieter