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



Returns TRUE if the specified module or view is enabled.


ezmodule( name )


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


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


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).


Example 1

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

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)


There are no comments.