@cfgparam() Function

Top  Previous  Next

@cfgparam() function returns the value of the given configuration parameter.

Syntax:

@sysparam(config-parameter-namedefault-value)

 

config-parameter-name

The name of the configuration parameter in config-type:config-name:sub-element-name format. Note that if config-name is defined relatively, then the parameter is taken from the page configuration.

default-value

The value to be returned in case of the given parameter does not exist in the configuration.

 

Examples:

@cfgparam('dataSource : products : itemsPerPage','20')

 
The config-name is relative; the parameter will be taken from the configuration of the current page.

<root>
  <dataSource name="products">
     ....
    <itemsPerPage>20</itemsPerPage>
  </dataSource> 
</root>

 

@cfgparam('globalDefinition : /applParams : enableFileManager ','false')

 
The config-name is absolute; the parameter will be taken from the global configuration.

<root>
  <globalDefinition name="applParams">
     ....
    <param name="enableFileManager">true</param>
  </dataSource> 
</root>