[Zope] DTML parameter to Python script

Michael Bleijerveld michael at bleijerveld.nl
Thu Oct 2 13:52:49 EDT 2003


Hi Dylan,

The result of the link is always the last link.

Regards.

Michael

----- Original Message ----- 
From: "Dylan Reinhardt" <zope at dylanreinhardt.com>
To: "Dragos Chirila" <d.chirila at bucarest.finsiel.ro>
Cc: "Zope Users" <zope at zope.org>
Sent: Thursday, October 02, 2003 7:12 PM
Subject: Re: [Zope] DTML parameter to Python script


> 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>
> <br>
> </dtml-in>
>
>
> Dylan
>
>
> _______________________________________________
> Zope maillist  -  Zope at zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>
>





More information about the Zope mailing list