#### 42.1.2 Understanding precedence of configuration settings

At run time DITA2Go builds a configuration for the starting map file in your project, beginning with the most specific settings: those in any map-specific configuration file, if there is one. Next come settings in the project configuration file.

Chain of configuration templates

Next, if the map-specific configuration file includes a value for [Templates]Configs (see §39.2 Referencing configuration files and templates), settings in the referenced configuration template (and any additional templates chained to it) are applied. If the map-specific configuration file does not reference a configuration template, next come settings in any configuration template referenced by the project configuration file; then on up the chain from that template. Table 42-1 shows the precedence of settings in configuration files and templates.

Table 42-1 Precedence of settings in configuration files and templates

Precedence | Configuration file | Description
Highest | ditamap.ini | Configuration file (if any) for a single DITA map file
| _d 2*.ini | Project configuration file
chaptemplate.ini or | Template referenced by ditamap.ini, if any
doctemplate.ini | Template referenced by _d 2*.ini via [Templates]Document if no such template is referenced by ditamap.ini (or no ditamap.ini is present)
projtemplate.ini | Template referenced by _d 2*.ini if no template is referenced by ditamap.ini (or no ditamap.ini is present)
commontemplate1.ini | Template referenced by chaptemplate.ini or by projtemplate..ini, whichever is used
commontemplateN.ini | Template referenced by commontemplateN-1.ini
Lowest | Default value | Whatever the DITA2Go default value is for the setting in question

A chain of configuration templates, if any, is applied to the source either from ditamap.ini (preferentially) or from the project configuration file, but not from both. In either case, settings from the templates are applied after settings from the project configuration file, which are applied after settings from the chapter configuration file. For the same setting with different values in different configuration files or templates, the value in the most specific file takes precedence. See §39.5.3 Chaining configuration templates.

Previous Topic: 42.1.1 Providing configuration files for individual ditamaps

Next Topic: 42.2 Overriding settings with PI markers or macros

Parent Topic: 42.1 Using a different configuration for selected files

Sibling Topics:

42.1.1 Providing configuration files for individual ditamaps