ibexa

Caution: This documentation is for eZ Publish legacy, from version 3.x to 5.x.

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.

Julia Shymova (13/07/2007 9:24 am)

Julia Shymova (13/07/2007 9:41 am)


Comments

There are no comments.