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.

ezpreference

Summary

Provides access to a user's preference values.

Usage

ezpreference( preference )

Parameters

NameTypeDescriptionRequired
preference string The name of the preference that should be extracted. Yes.

Returns

A string containing the contents/value of the specified preference.

Description

This operator makes it possible to extract the preference values of the current user. The name of the desired preference must be provided as a parameter. The function returns the value/contents of the specified preference. The current user can set a preference by requesting a URL of the following type:

/user/preferences/set/[name_of_preference]/[value]

Examples

Example 1

{ezpreference( 'bookmark_menu' )}

Returns the value/contents of the "bookmark_menu" preference for the current user.

Balazs Halasy (05/02/2004 10:33 am)

Balazs Halasy (04/05/2005 1:46 pm)


Comments

  • Default value?

    Is there any way to set a default value in case the user never triggers a preference?