[Zope] add[Folder, DTML Document]

Michel Pelletier michel@digicool.com
Fri, 14 Jan 2000 15:41:57 -0500


> -----Original Message-----
> From: Bill Scherer [mailto:scherbi@bam.com]
> Sent: Friday, January 14, 2000 2:56 PM
> To: zope@zope.org
> Subject: [Zope] add[Folder, DTML Document]
> 
> 
> I've written a simple index_html method that allows me to 
> subvert Zope's
> folders to create a url directory.  the method iterates through
> objectValues(['Folder', 'DTML Document']).  If the object has 
> a property
> 'url', it displays it as a link, otherwise, it's a folder and is
> displayed as a link to move into that folder.  It's simple and works
> well.
> 
> My problem is that I'd like to simplify adding links and folders.  For
> now, I've been using the management interface to do so.  I'd like to
> build my own.  I was able to create an addFolder method, and it worked
> fine except that it returned me to the management view of the folder,
> instead of the standard public view of the folder.  

Are you calling manage_addFolder?  Try calling it with a REQUEST=None
keyword argument.  In DTML it would be:

<dtml-call "manage_addFolder('aFolderName', REQUEST=_.None)">

This will cause you not to be redirected.

-Michel