Zimlet Configuration File: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
{{BC|Community Sandbox}} | |||
__FORCETOC__ | |||
<div class="col-md-12 ibox-content"> | |||
=Zimlet Configuration File= | |||
{{KB|{{Unsupported}}|{{ZCS 8.0}}|{{ZCS 7.0}}|}} | |||
{{Archive}}{{WIP}}The '''Zimlet configuration file''' specifies a template for Zimlet configuration. It's name is should be hard-coded to ''config_template.xml''. There are two sections to this file: a section for global configuration, and a section for per host configuration. | {{Archive}}{{WIP}}The '''Zimlet configuration file''' specifies a template for Zimlet configuration. It's name is should be hard-coded to ''config_template.xml''. There are two sections to this file: a section for global configuration, and a section for per host configuration. | ||
Revision as of 14:50, 13 July 2015
Zimlet Configuration File
The Zimlet configuration file specifies a template for Zimlet configuration. It's name is should be hard-coded to config_template.xml. There are two sections to this file: a section for global configuration, and a section for per host configuration.
The configuration properties may be accessed within the Zimlet definition file as follows:
<zimletConfig name=”com_acme_Maps” version=”1.0”> <global> <property name=”defaultToGoogle”></property> <property name="allowedDomains">*.google.com</property> </global> <host name=""> <property name=”googleApi”></property> <property name=”geocodeUser”></property> <property name=”geocodePass”></property> </host> </zimletConfig>
The properties defined in the configuration file may be accessed within the Zimlet definition file as follows:
- ${config.global.propertyName} - Accesses a global property. For example, the global property defaultToGoogle would be accessed as: ${config.global.defaultToGoogle}
- ${config.host.propertyName} - Access a host specific property. For example, the host property googleApi would be accessed by ${config.host.googleApi}
Configuration properties are also available to Zimlet JavaScript code via Zimlet classes getConfigProperty method.