About Bookmarks

Adds a simple API for users to bookmark pages.

Category 1Development Tools
Modules that have more to do with assisting development of a site rather than managing its content.
Category 2Other Modules
Modules that have a unique purpose not covered by existing categories.
Release StateStable
Should be safe for use in production environments. *
Authorphilipp
Module Version1.0.2
Class NamePageBookmarks
Compatibility2.5, 2.6, 2.7
Date AddedOctober 10, 2014
Recommended ByNew recommendations may take up to 1 day to appear.

Instructions

This module's files should be placed in /site/modules/PageBookmarks/
How to install or uninstall modules

README

Page Bookmarks

This module provides a simple API for letting the user bookmark pages. It differentiates between logged on users and guests.

Bookmark API

$page->bookmark->save();	// bookmarks the current page for the current user

This will add a basic bookmark to the current page. You can optionally allow the user to set custom tags or a custom comment for the bookmark:

$page->bookmark->comment = 'I love kittens';
$page->bookmark->tags = array('cute', 'fluffy', 'pink');
$page->bookmark->save();

You can remove the bookmark using $page->bookmark->delete().

User Bookmarks API

You can get all bookmarks of the user this way:

$user->bookmarks; //Returns an array containing all bookmarks

Furthermore, if you want to get the bookmarks grouped by tag, you can use $user->bookmarks(true).

Demo

You can find a live demo version of this module here: http://nickel-1vn.lightningpw.com.