Omni Systems, Inc.

  

Mif2Go User's Guide, Version 55

  

Valid HTML 4.01!

 

Made with Mif2Go

30 Working with templates > 30.2 Referencing configuration files and templates


30.2 Referencing configuration files and templates

To reference a Mif2Go-provided general configuration file or template:

[Templates]

Configs = %OMSYSHOME%\path\to\sometemplate.ini

This setting takes the place of the deprecated [FDK]ConfigTemplate setting. Replace the old [FDK] setting with the new [Templates] setting in all your configuration files. Your Mif2Go distribution includes configuration templates already chained together through references like this; see §30.1.3 Understanding how templates are chained together.

When Mif2Go 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%\m2g\local\config\local_m2rtf_config.ini

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

[Templates]

Configs = relative\path\to\myspecial.ini

Make paths to your own configuration files relative to the referencing configuration file. 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 §30.6 Creating your own configuration templates.

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

Configs = %omsyshome%\m2g\local\config\local_m2htm_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:

The last referenced file in the chain overrides Mif2Go internal default values.

A referenced configuration file overrides, in turn, any files it references.

A document-specific configuration file overrides any files it references, and also overrides any other files the starting project configuration file references

The starting project configuration file overrides any files it references.

Any chapter-specific configuration file overrides the project configuration file, for its FrameMaker chapter only.

See §33.1.2 Understanding precedence of configuration settings.



30 Working with templates > 30.2 Referencing configuration files and templates