Fw: [Zope] DTML parameter to Python script

Michael Bleijerveld michael at bleijerveld.nl
Thu Oct 2 15:04:27 EDT 2003


Hi Dylan,

Here is the source

DTML-document: test

<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>

Python script: setDirectory

from AccessControl import getSecurityManager
user = getSecurityManager().getUser()
username = user.getUserName()

container.REQUEST.set('CurrentDir',directory)
url=context.REQUEST.URL1 + '/' + 'test'
return url

 Michael
>
> ----- Original Message ----- 
> From: "Dylan Reinhardt" <zope at dylanreinhardt.com>
> To: "Michael Bleijerveld" <michael at bleijerveld.nl>
> Cc: "Zope Users" <zope at zope.org>
> Sent: Thursday, October 02, 2003 8:54 PM
> Subject: Re: [Zope] DTML parameter to Python script
>
>
> > On Thu, 2003-10-02 at 10:52, Michael Bleijerveld wrote:
> > > Hi Dylan,
> > >
> > > The result of the link is always the last link.
> >
> > Sounds like a problem with the script creating the link.
> >
> > Care to post the source?
> >
> > 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