Saving a Rendered DTML Document
Hello. I have a DTML document which contains some DTML, but mostly HTML. I want to save the HTML contents of this DTML document once it is rendered by Zope (i.e. once the DTML is evaluated) in another DTML document (i.e. this document will only contain HTML offcourse and must be since it will be used by a PHP script). Is there a way to do this so every time the former changes, the latter is updated as well? Any help would be appreciated. Thanks. - Asad
Is there any particular reason why you posted this message twice, 5 hrs apart? Asad Habib wrote:
Hello. I have a DTML document which contains some DTML, but mostly HTML. I want to save the HTML contents of this DTML document once it is rendered by Zope (i.e. once the DTML is evaluated) in another DTML document (i.e.
Just render it into a File object using a python script. Run the python script as part of your processing that changes the DTML document or what the DTML document renders.... You could, of course, stop hurting yourself and replace the DTML document with a ZPT... Chris -- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
Hi. I have never used ZPT before, but from what I read, it seems like I can include the contents of a rendered DTML document (i.e. HTML only) in a Page Template by using <tal:content>. Am I correct? Also, if you could point me to an example, that would help. Thanks. - Asad On Wed, 7 Dec 2005, Chris Withers wrote:
Is there any particular reason why you posted this message twice, 5 hrs apart?
Asad Habib wrote:
Hello. I have a DTML document which contains some DTML, but mostly HTML. I want to save the HTML contents of this DTML document once it is rendered by Zope (i.e. once the DTML is evaluated) in another DTML document (i.e.
Just render it into a File object using a python script. Run the python script as part of your processing that changes the DTML document or what the DTML document renders....
You could, of course, stop hurting yourself and replace the DTML document with a ZPT...
Chris
-- Simplistix - Content Management, Zope & Python Consulting - http://www.simplistix.co.uk
--On 7. Dezember 2005 10:40:04 -0500 Asad Habib <ahabib@engin.umich.edu> wrote:
Hi. I have never used ZPT before, but from what I read, it seems like I can include the contents of a rendered DTML document (i.e. HTML only) in a Page Template by using <tal:content>. Am I correct? Also, if you could point me to an example, that would help. Thanks.
You are missing the basis of Zope. Any Zope object that provides an API to generate content (HTML/plain text or whatever) can be called from a PyScript, from ZPT, from DTML. You just have to call the object method. The content returned from the object is then inserted into the output stream. And tal:content would be the way to take an object and call one of its exposed methods to produce *something*. Everything else is documented in three chapters of the Zope Book. -aj
participants (3)
-
Andreas Jung -
Asad Habib -
Chris Withers