Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To use a template when creating another section, simply put the template name in parentheses after the section heading name, as shown in the example below. If you want to inherit from multiple templates, use commas to separate the template names).

Code Block
langjavascript
[template-name](!)
setting=value

[template-2](!)
setting2=value2

[section-name](template-name,template-2)
setting3=value3

The newly-created section will inherit all the values and objects defined in the template(s), as well as any new settings or objects defined in the newly-created section. The settings and objects defined in the newly-created section override settings or objects of the same name from the templates. Consider this example:

Code Block
langjavascript
[test-one](!)
permit=192.168.0.2
host=alpha.example.com
deny=192.168.0.1

[test-two](!)
permit=192.168.1.2
host=bravo.example.com
deny=192.168.1.1

[test-three](foo,bar)
permit=192.168.3.1
host=charlie.example.com

...