Deleting bookmarks using an override template

Author Message

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?

Regards
Jon

Ɓ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

Jon Staines

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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.

eZ debug

Timing: Jan 19 2025 04:20:24
Script start
Timing: Jan 19 2025 04:20:24
Module start 'layout'
Timing: Jan 19 2025 04:20:24
Module start 'content'
Timing: Jan 19 2025 04:20:24
Module end 'content'
Timing: Jan 19 2025 04:20:24
Script end

Main resources:

Total runtime0.6287 sec
Peak memory usage4,096.0000 KB
Database Queries57

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0059 590.7188152.6406
Module start 'layout' 0.00590.0034 743.359439.4766
Module start 'content' 0.00930.6180 782.8359547.4844
Module end 'content' 0.62730.0014 1,330.320312.1250
Script end 0.6287  1,342.4453 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00330.5185160.0002
Check MTime0.00130.2105160.0001
Mysql Total
Database connection0.00070.104510.0007
Mysqli_queries0.573391.1852570.0101
Looping result0.00050.0777550.0000
Template Total0.595394.720.2976
Template load0.00250.402920.0013
Template processing0.592794.272720.2964
Template load and register function0.00010.019210.0001
states
state_id_array0.00120.190610.0012
state_identifier_array0.00100.162020.0005
Override
Cache load0.00210.3400230.0001
Sytem overhead
Fetch class attribute can translate value0.00060.087520.0003
Fetch class attribute name0.00110.175750.0002
XML
Image XML parsing0.00120.186820.0006
class_abstraction
Instantiating content class attribute0.00000.002260.0000
General
dbfile0.00500.7878240.0002
String conversion0.00000.001840.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
3content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
3content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
7content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
4content/datatype/view/ezxmltags/literal.tpl<No override>extension/community/design/standard/templates/content/datatype/view/ezxmltags/literal.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 20
 Number of unique templates used: 7

Time used to render debug report: 0.0001 secs