ezini
Summary
Provides read access to settings in the configuration files.Usage
ezini( section, variable [, ini file] )
Parameters
Name | Type | Description | Required |
---|---|---|---|
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. |
Returns
A string containing the value of a configuration setting.Description
This operator makes it possible to access the settings in the configuration ("*.ini") files.
Examples
Example 1
{if eq(ezini( 'SomeSettings', 'Test', 'example.ini' ), 'hello' )} [...display something...] {else} [...display something else...] {/if}
Conditional branching based on an configuration setting.
Balazs Halasy (05/02/2004 10:32 am)
Balazs Halasy (04/05/2005 1:46 pm)
Comments
in 3.9
Monday 15 January 2007 8:37:02 am
VaL
For example:
When compilation of tpl is enabled:
=> if ini variable doesn't exist warnings will not be shown
http://ez.no/bugs/view/7449
4th parameter
Wednesday 23 August 2006 2:29:28 pm
Vincent Lepot @ Smile.fr
ezini( section, variable [, ini file [, dynamic] ] )
If dynamic = true, the value will be dynamically retrieved from ini file. Else, it will be retrieved during template compilation and will be hard coded in the compiled template.
Re: 4th parameter
Thursday 02 November 2006 6:18:45 pm
Vincent Lepot @ Smile.fr
ezini( section, variable [, ini file [, ini path [, dynamic] ] ] )
If you don't need 'ini path' to be set, you can specify false()