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

ezini_hasvariable

Summary

Returns TRUE if the specified configuration directive is set.

Usage

ezini_hasvariable( section, variable [, ini_file [, ini_path [, dynamic ] ] ] )

Parameters

NameTypeDescriptionRequired
section string Section to read value from. Yes.
variable string The name of the directive that should be accessed. Yes.
ini_file string The target configuration file (default is "site.ini"). No.
ini_path string Custom path to the configuration file(s). No.
dynamic boolean If the specified directive should be dynamically checked. No.

Returns

TRUE if the specified configuration directive is set, FALSE otherwise.

Description

This operator can be used to check if a configuration directive is set (or if it is empty). The "section", "variable" and "ini_file" parameters should be used to pinpoint the directive to be checked. If the directive is not set, the operator will return FALSE, otherwise it will return TRUE. The "ini_path" variable can be used to set a custom path. The "dynamic" parameter can be used to force the system to actually check the ini file, otherwise the value will be checked only upon template compilation and "hardcoded" in the compiled templates.

Examples

Example 1

{ezini_hasvariable( 'VersionManagement', 'DeleteDrafts', 'content.ini' )}

Returns TRUE if "DeleteDrafts" has been set to something within the "[VersionManagement]" block of "content.ini" or an override; otherwise FALSE is returned.

Balazs Halasy (18/03/2007 1:40 pm)

Balazs Halasy (01/04/2007 4:36 pm)


Comments

There are no comments.