How to add node to a users bookmarks?

Author Message

Maarten Holland

Friday 25 November 2005 6:28:56 am

Hi all,

Could you perhaps tell me what code I need to place in my template to create a link or button that adds the currently viewed node to the bookmarks of the current users?

Cheers,

Maarten

Ɓukasz Serwatka

Monday 28 November 2005 12:42:36 am

Hi Maarten,

You can use following code in your template:

<form method="post" action={"/content/action"|ezurl}>
  <input type="hidden" name="ContentNodeID" value="{$node.node_id}" />
  <input type="submit" name="ActionAddToBookmarks" value="Add to bookmarks" />
</form>

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

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 20 2025 09:01:22
Script start
Timing: Jan 20 2025 09:01:22
Module start 'layout'
Timing: Jan 20 2025 09:01:22
Module start 'content'
Timing: Jan 20 2025 09:01:22
Module end 'content'
Timing: Jan 20 2025 09:01:22
Script end

Main resources:

Total runtime0.0207 sec
Peak memory usage2,048.0000 KB
Database Queries3

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0053 589.2734152.6406
Module start 'layout' 0.00530.0034 741.914139.4766
Module start 'content' 0.00860.0092 781.390689.3672
Module end 'content' 0.01780.0028 870.757830.3047
Script end 0.0206  901.0625 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.002612.3922140.0002
Check MTime0.00115.4080140.0001
Mysql Total
Database connection0.00073.496110.0007
Mysqli_queries0.003215.531930.0011
Looping result0.00000.077010.0000
Template Total0.002210.710.0022
Template load0.00104.663010.0010
Template processing0.00125.973610.0012
Override
Cache load0.00073.263910.0007
General
dbfile0.003717.970480.0005
String conversion0.00000.042540.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs