ezmodule
Summary
Returns TRUE if the specified module or view is enabled.Usage
ezmodule( name )
Parameters
Name | Type | Description | Required |
---|---|---|---|
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.