RE: [Zope] Deleting an Object through a link
<a href="Houses/manage_delObjects([<!--#var id-->])">delete House</a>
You need to call it with a URL syntax, not python:: <a href="House/manage_delObjects?ids:list=<!--#var id-->">delete house</a> (adding the :list marshalls the id into a list object, even though we're only passing in one.) -----Original Message----- From: Alexander Schad [mailto:ags@beehive.de] Sent: Monday, May 17, 1999 12:05 PM To: zope@zope.org Subject: [Zope] Deleting an Object through a link Hi! I want to provide a link in a html-page that deletes a certain Object. My idea was something like: <a href="Houses/manage_delObjects([<!--#var id-->])">delete House</a> but the syntax doesn´t seem to be correct. Any ideas? Bye Alex _______________________________________________ Zope maillist - Zope@zope.org http://www.zope.org/mailman/listinfo/zope (For developer-specific issues, use the companion list, zope-dev@zope.org - http://www.zope.org/mailman/listinfo/zope-dev )
It worked! My next problem is that when i deleted a house i want to get to a certain URL. But i always get to the Folder where i deleted the Object. Alex
On Mon, 17 May 1999, Alexander Schad wrote:
It worked! My next problem is that when i deleted a house i want to get to a certain URL. But i always get to the Folder where i deleted the Object. Alex
Hi Alex: This is kind of an answer to your previous question as well. I think that while encoding your command into the URL works you're not going to be happy with it because it will always take you to the manage screen. What I've done before is create a document called deleteResult for example which will contain the DTML commands to actually delete the object. ie: <!--#call "manage_deleteObject(REQUEST['objToDelete'])"--> <h1>The object was deleted</h1> This way you can hide the management interface from users if you want, or you can redirect to a particular folder after you're done the delete. Hope this helps, ------- Jordan B. Baker -- jbb@spyderlab.com weaving the web @ http://www.spyderlab.com
Hi
What I've done before is create a document called deleteResult for example which will contain the DTML commands to actually delete the object. ie:
<!--#call "manage_deleteObject(REQUEST['objToDelete'])"--> <h1>The object was deleted</h1>
This way you can hide the management interface from users if you want, or you can redirect to a particular folder after you're done the delete.
Could anybody tell me the syntax to redirect to a certain page? Ciao, Alex
participants (4)
-
Alexander Schad -
Jeffrey Shell -
Jordan B. Baker -
Thilo Mezger