Calling Templates

You can call a template from a generated file or from another template by entering its name surrounded by percentage signs. Object properties, collections, and local and global variables are called in the same way. At generation time, a template call is replaced by the template content, which is then resolved to its final textual value.

Examples:
Breaking templates into concise units and calling them at generation time helps with readability and reuse. For example, you can define a commonly-used condition in one template and reference it in multiple other templates:
Example
The %isInner% template is defined as:
.bool (%ContainerClassifier%!=null)
The %QualifiedCode% template calls the %isInner% template to test if the class is an inner class:
.if (%isInner%)
	%ContainerClassifier.QualifiedCode%::%Code%
.else
	%Code%
.endif
Result:
C2::C1
The %QualifiedCode% template is applied to the C1 class, which is an inner class to C2.