[Zope] DTML rendering from python?
Michiel Toneman
michiel@ylnd.com
22 Jan 2003 16:38:32 +0100
Hi all,
I'm hoping a Zope guru on the list can help me with this one. 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
def index_html (self, REQUEST, RESPONSE, preview=0, original=0):
"""
The default view of the contents of an Article Page.
"""
return self.view_normal()
view_normal=DTMLFile('dtml/viewArticlePage', globals())
viewArticlePage.dtml does a <dtml-var getHTML> to publish the object.
Thanks,
Michiel Toneman