ezmodule

Summary

Returns TRUE if the specified module or view is enabled.

Usage

ezmodule( name )

Parameters

NameTypeDescriptionRequired
name string The name of the module or view that should be checked (for example "ezinfo" or "content/search"). Yes.

Returns

TRUE if the specified module or view is enabled, FALSE otherwise.

Description

This operator checks if the specified module or view is enabled according to the "Rules" configuration array located in the [SiteAccessRules] section of "site.ini" or an override. Note that this operator can not be used to check whether the current user has access to a certain function of the specified module (this can only be done using the "has_access_to" fetch function of the "user" module).

Examples

Example 1

{def $isShopEnabled = ezmodule( 'shop' )}
{if $isShopEnabled}
    The shop module is enabled.
{else}
    The shop module is disabled.
{/if}

Outputs information about whether the "shop" module is enabled or disabled.

Example 2

{ezmodule( 'content/tipafriend' )}

Returns TRUE if "tipafriend" view of the "content" module is enabled, FALSE otherwise.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2013 eZ Systems AS (except where otherwise noted). All rights reserved.