[Zope] executing dynamically generated code (eval)?

Ausum augusto@artlover.com
Wed, 02 May 2001 02:29:17 -0500


You may try either one of these:

<dtml-var "_.getitem('any_method', 1)">

<dtml-var "_['any_method']">


getitem is a method of the special namespace variable, _ , and besides of the
name argument it accepts a flag (1 or 0). When true, the current 'any_method'
will be called and processed, if has logic within, and the result will be
returned. When false, only the plain content of the method is returned. 


Ausum



Marcus Schopen wrote:
> 
> Hi there,
> 
> is there a kind of dtml-eval command?
> 
> I'd like to execute dynamicly generated code like:
> <dtml-var <dtml-var someting>>.
> 
> Thank you
> Marcus
> 
> _______________________________________________
> 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 )