Zimlets Configuration File WP: Difference between revisions
(Zimlets Whitepaper conversion 8 Zimlet Configuration File) |
No edit summary |
||
Line 1: | Line 1: | ||
The config_template.xml file specifies a template for Zimlet configuration. There are two sections to this file: a section for global configuration, and a section for per host configuration. | {{Archive}The config_template.xml file specifies a template for Zimlet configuration. There are two sections to this file: a section for global configuration, and a section for per host configuration. | ||
The configuration properties maybe accessed within the Zimlet definition file as follows: | The configuration properties maybe accessed within the Zimlet definition file as follows: |
Latest revision as of 12:59, 24 March 2015
{{Archive}The config_template.xml file specifies a template for Zimlet configuration. There are two sections to this file: a section for global configuration, and a section for per host configuration.
The configuration properties maybe accessed within the Zimlet definition file as follows:
<zimletConfig name=”com_acme_Maps” version=”1.0”> <global> <property name=”defaultToGoogle”></property> </global> <host name=””> <property name=”googleApi”></property> <property name=”geocodeUser”></property> <property name=”geocodePass”></property> </host> </zimletConfig>
The properties defined in config_template.xml 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 method getConfigProperty.