Configuring configFile templatesExport templates are a functionality that allows exporting "snippets" of configuration data into a "document" which contains fixed text and "placeholders" for specific configuration data. SWEAGLE adopts a JavaScript templating engine allowing to "script" the content for the placeholders. Those snippets of scripts can return: a specific value for a CDI keyName at a given patha value-based upon a conditional statement: if a key A has value B then print C, otherwise print Da block of keyNames and their values, for instance, all the CDIs at a given node pathblocks of data based upon loops and iterations to create custom export formats and syntax Configuration Admin users can create and manage "templates" under the menu "admin"-"parsers" and use the type "templates". The configuration of templates is under automatic version control. Upon publishing a template configuration SWEAGLE automatically creates a new version for it. Older versions are available from the drop-down list and can be used to create a new draft. The scripts are added to the template using delimiters which identify the logic. The following default delimiters are supported: {{ }} for evaluation - allows to add pure javascript {{= }} for interpolation {{! }} for interpolation with encoding {{# }} for compile-time evaluation/includes and partials {{## #}} for compile-time defines {{? }} for conditionals {{~ }} for array iteration More advanced examples of scripts can be found on this GitHub project: https://github.com/olado/doT/blob/master/examples/advancedsnippet.txt. Example Using the config data set for an example environment "prod5" and the attached script snippets, a text document is generated with fixed text and: A full reference to a CDI path which results in the CDI value to be exportedA conversion - checking if the value is "true" then it becomes "enabled". In case of "false" it becomes "disabled"Lists all child nodes to a given node pathLists all CDI keyNames and values for a given node path As an example, to refer to a specific CDI at a specific path in the CDS you use the syntax {{=metadataset.node1.node2.name}} The double curly braces and the word config dataset are mandatory. Please see the attached file sampleExportTemplate.js.txt for reference purposes. Notes Agnostic templates Templates can be written such that they can be reused against config data sets which have the same structure but for a different object. For instance, you have 2 comparable config data sets for PRD1 and PRD2. In order to make the template parser commands agnostic from the CDS name (which is the "root" of the config data set), add the following commands at the start of the template. Those commands will remove the "root" node from the data set. As such the place holder to refer to a specific CDI key or node can be written generic and irrespective of the config data set it is executed against assuming the datasets have the same "structure". {{ nodeName = Object.keys(metadataset)[0]; metadataset = metadataset[nodeName]; }}