Forums / Setup & design / Deleting bookmarks using an override template
Jon Staines
Monday 19 June 2006 8:24:03 am
I made an override template based on the standard content/bookmark.tpl file. This was to change the text on the page and remove the link to edit pages if the user has the correct permissions. This left just a list of checkboxes with the page names beside them, and at the bottom is the dustbin icon/button.
But if you mark a checkbox and click the dustbin then the page just reloads without deleting the bookmark. Deleting a bookmark works fine in the original template.
What am I missing or is there a file I need to edit to allow a new template form to perform an action?
RegardsJon
Ćukasz Serwatka
Tuesday 27 June 2006 12:07:22 am
Make sure that remove button name is RemoveButton
<input type="submit" name="RemoveButton" value="{'Remove'|i18n('design/standard/content/view')}" />
For action use
<form action={"/content/bookmark"|ezurl} method="post" >
For remove checkboxes use
<input type="checkbox" name="DeleteIDArray[]" value="BOOKMARK_ID_HERE" />
Personal website -> http://serwatka.net Blog (about eZ Publish) -> http://serwatka.net/blog
Monday 25 September 2006 2:57:37 am
Sorry for the late reply.
Thanks for that information. In my template I have:
<input type="checkbox" name="DeleteIDArray[]" value="{$:item.id}" /> <form action={concat("content/bookmark/")|ezurl} method="post" > <input type="image" name="RemoveButton" value="{'Remove'|i18n('design/standard/content/view')}" src={"trash.png"|ezimage} alt="{'Remove'|i18n('design/standard/content/view')}" />
I'll try it with just what you had for the form action and see if it works.