Can one protect dtml from being rendered?
Hi there! My final question for today: When i generate a new document A and take the document content from some kind of template B, is there a way to get some dtml in the document rendered and some inserted directly? Suppose SomeVar holds 'SomeText' and AnotherVar holds 'AnotherText'. How do i protect AnotherVar so that <!-- begin B --> <dtml-var SomeVar> <dtml-var AnotherVar> <!-- end B --> becomes <!-- begin A --> SomeText <dtml-var AnotherVar> <!-- end A --> after insertion? Thanks Bernd -- -----Bernd Worsch-----------bernd.worsch@frontsite.de--------
<dtml-var document_src> will return the unrendered source of a DTML Document. I'm not sure if that's what you're looking for. (Since the tags inside the unrendered source are still within <> tags, they wont show in a browser. If you wanted them readable, you'd have to escape the html, I guess) Hope this helps. Chris Muldrow
From: Bernd Worsch <bernd.worsch@frontsite.de> Reply-To: Bernd Worsch <bernd.worsch@frontsite.de> Date: Mon, 19 Mar 2001 19:08:14 +0100 To: zope@zope.org Subject: [Zope] Can one protect dtml from being rendered?
Hi there!
My final question for today: When i generate a new document A and take the document content from some kind of template B, is there a way to get some dtml in the document rendered and some inserted directly?
Suppose SomeVar holds 'SomeText' and AnotherVar holds 'AnotherText'.
How do i protect AnotherVar so that
<!-- begin B --> <dtml-var SomeVar> <dtml-var AnotherVar> <!-- end B -->
becomes
<!-- begin A --> SomeText <dtml-var AnotherVar> <!-- end A -->
after insertion?
Thanks Bernd
--
-----Bernd Worsch-----------bernd.worsch@frontsite.de--------
_______________________________________________ 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 )
On Mon, Mar 19, 2001 at 06:21:27PM -0500, Chris Muldrow wrote:
<dtml-var document_src> will return the unrendered source of a DTML Document. I'm not sure if that's what you're looking for. (Since the tags inside the unrendered source are still within <> tags, they wont show in a browser. If you wanted them readable, you'd have to escape the html, I guess) Hope this helps. Chris Muldrow
Thanks for the answer. It's not as nice as i hoped, but at least it is working. I put the code i wan't to render and the code i want to use 'as is' in separate methods. Grabbing them via calling or respectivly the document_src method, combining the results into a string and calling manage_edit with it does the trick. -- -----Bernd Worsch-----------bernd.worsch@frontsite.de--------
participants (2)
-
Bernd Worsch -
Chris Muldrow