[Zope] DTML parameter to Python script

Dylan Reinhardt zope at dylanreinhardt.com
Thu Oct 2 13:12:52 EDT 2003

On Thu, 2003-10-02 at 09:55, Dragos Chirila wrote:
> Hi
> <dtml-in "admin.objectIds('Local Directory')">
>     <img src="/misc_/OFSP/Folder_icon.gif"> <a href=<dtml-var
> expr="setDirectory('<&dtml-sequence-item>')">> <dtml-var sequence-item></a>
> <br>
> </dtml-in>
> in a python expression you cannot have dtml tags !!!

Ah, good catch... not sure why I didn't notice what this was being
passed to.

> instead, write like this:
>  .. expr="setDirectory(_['sequence-item']) ...

Better yet, use the prefix attribute of dtml-in:

<dtml-in "admin.objectIds('Local Directory')" prefix=obj>
<img src="/misc_/OFSP/Folder_icon.gif"> <a href=<dtml-var
 expr="setDirectory(obj_item)">> <dtml-var obj_item></a>


More information about the Zope mailing list