Caution: This documentation is for eZ Publish legacy, from version 3.x to 6.x.
For 5.x documentation covering Platform see eZ Documentation Center, for difference between legacy and Platform see 5.x Architecture overview.

bookmarks

Summary

Fetches the bookmarks of the current user.

Usage

fetch( 'content', 'bookmarks', hash( [ 'offset', offset, ]
                                     [ 'limit',  limit   ] ) )

Parameters

NameTypeDescriptionRequired
offset integer Number of bookmarks to skip. No.
limit integer Maximum number of bookmarks to fetch. No.

Returns

An array of ezcontentbrowsebookmark objects.

Description

Fetches the bookmarks of the current user and returns an array of ezcontentbrowsebookmark objects. The resulting array starts with the most recently added bookmark.

Examples

Example 1

{def $bookmarks=fetch( 'content', 'bookmarks' )}
 
{foreach $bookmarks as $bookmark}
 
    <a href={$bookmark.node.url_alias|ezurl}>{$bookmark.name|wash}</a> <br />
 
{/foreach}

Outputs all the bookmarks (as links) for the current user.

Example 2

{def $bookmarks=fetch( 'content', 'bookmarks',
                       hash( 'limit', 5 ) )}
 
{foreach $bookmarks as $bookmark}
 
    <a href={$bookmark.node.url_alias|ezurl}>{$bookmark.name|wash}</a> <br />
 
{/foreach}

Outputs the five most recently added bookmarks (as links) for the current user.

Balazs Halasy (06/02/2004 12:00 pm)

Julia Shymova (18/07/2008 8:05 am)

Balazs Halasy, Julia Shymova


Comments

There are no comments.