[Zope] Rendering DTML from string

Samir Mishra SamirMishra at cbuae.gov.ae
Sat Apr 3 05:43:45 EST 2004


Hello all,


I'm reading in text from a file residing in a LocalFS object, it contains
DTML code. My DTML method prints the DTML code rather than rendering the
variables. How can I get it to change this behaviour?

IE ---
In a folder I have 3 object -
a_dtml
b_html
c_LocalFS--
          |
          -- x.txt

File contents -

b_html 
------
<h2>This should display as title text</h2>

x.txt
-----
<dtml-var name="b_html">


I need a_dtml to display -
<h2>This should display as title text</h2>
instead I get - 
<dtml-var name="b_html">

I've tried <dtml-var "_.getattr(c_LocalFS, 'x.txt')"> and a number of other
variations on the same (getitem, etc. ) but can's seem to get this to work. 

What do I need to do to get a DTML method to render a string containing dtml
code?

Thanks.

Samir



More information about the Zope mailing list