[Zope] dtml within dtml

Michel Pelletier michel@digicool.com
Sat, 08 Apr 2000 15:45:24 -0700


Graham Chiu wrote:
> 
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I have HTML stored within my Interbase tables which I access as
> 
> <dtml-var description>
> 
> I just tried storing within that HTML, a reference to a dtml method, but
> it does not display.
> 
> Is that because this is considered dtml within dtml?

Sort of, the DTML engine does not evaluate code in what it basicly
considers a 'string'.

> Should we have another tag such as
> 
> <dtml-code variable>
> 
> where the text retrieved by variable also gets interpreted?

Uhm... I don't know.  What you want to turn your string into is an
object that can evaluate DTML code, then you can call it from another
tag such as var or call or in.  This cannot be done from DTML, you need
to drop to python to do this.  Just instanciate a 'temporary' DTML
object (proabably a method), feed it your string, and then call it. 
This could probably be done easily from an external method:

<dtml-var "anExternalMethod("<dtml-var blah>")">

-Michel

-Michel