ezsiteaccessoperator

UNIX name Owner Status
ezsiteaccessoperator Vidar Langseid stable
Version Compatible with
1.0.0 4.0
This extension makes it possible to access the $GLOBALS['eZCurrentAccess'] variable
from templates using a template operator called siteaccess() operator.

The $GLOBALS['eZCurrentAccess'] array typically contains at least two elements:
name : Name of the siteaccess, for instance 'eng', 'nor' or 'ezwebin_site'
type : An integer identifying how the siteaccess was matched (by uri or host name for instance)
See constants defined in access.php for possible values of this variable

The operator have two usages:
{siteaccess()} : which will return the whole $GLOBALS['eZCurrentAccess'] array

{siteaccess('[key]')} : will return the element in $GLOBALS['eZCurrentAccess'] specified by [key]

Examples :
{siteaccess('type')}
{siteaccess('name')}
{siteaccess()}

Download

The extension is available here.

The svn repository for the extension is located here.

This project has no reviews yet. Be the first one to review it!

No forum messages yet.