39.2 Referencing configuration files and templates

To reference a general configuration file or template:

[Templates]
Configs = %OMSYSHOME%\path\to\sometemplate.ini

Your DITA2Go distribution includes configuration templates already chained together through references like this; see §39.1.3 Understanding how templates are chained together.

When DITA2Go creates a starting configuration file for a new project, that file includes the first link in the chain. For example, a starting project configuration file for Word output includes this reference:

[Templates]
Configs = %OMSYSHOME%\d2g\local\config\local_d2rtf_config.ini

If you want to insert another configuration file (for example, myspecial.ini) in the chain between the project configuration file and local_d2rtf_config.ini, you would copy this reference into myspecial.ini, and replace it with the following reference in the project configuration file:

[Templates]
Configs = path\to\myspecial.ini

You can chain configuration files together by including in each a [Templates]Configs setting that references yet another template or configuration file. You can have as many referenced files chained as you please; each overrides the one it references, and all others that precede the referenced template in the chain. The most specific configuration rules. See §39.5 Creating your own configuration templates.

Settings that specify paths to configuration templates, or to any other files in the DITA2Go distribution directory structure, should use absolute paths that begin with environment variable %OMSYSHOME%; for example:

Configs = %omsyshome%\d2g\local\config\local_d2htm_config.ini

If you specify a relative path for any setting in configuration section [Templates], that path is considered to be relative to the configuration file in which the setting occurs.

Precedence of settings

If the same setting has different values in a referenced template or configuration file and in a file that references that template, the value in the referencing file takes precedence, allowing you to override the template when necessary:

See §42.1.2 Understanding precedence of configuration settings.

Previous Topic:  39.1.6 Understanding how language templates are organized

Next Topic:  39.3 Including document-specific configuration files

Parent Topic:  39. Working with templates

Sibling Topics:

39.1 Working with configuration templates

39.3 Including document-specific configuration files

39.4 Deciding which configuration file to edit

39.5 Creating your own configuration templates