The IncludeCodeTemplate command is used to include content from another template, and will only include paragraphs which contain XpressDox fillpoints.
Command structure:
«IncludeCodeTemplate(system:Central code)»
Parameters to the command:
system | The alias as defined in the configuration. This is optional but useful as it defines the location of the template. |
Central code | The name of the code template. |
Why use a code template in template development:
Consider the below image:
The template on the left is the “Document template” and the one on the right is the “Code template”. It could also be thought of as an “Interview template” since most of what you would include in a code template affects the interview only (Captions, Headings, Footings, HzGroups, Tabs, FormatNumberOnInput etc). Using «IncludeCodeTemplate()» you can include the code from the template on the right into the template on the left. And not only that, you could re-use that same code into many of your templates.
Some things to note:
- Any number of CodeTemplates can be used on a template. You may have a code template that is common to all templates, another that is common to this practice area, and another that is specific to this template only.
- The «IncludeCodeTemplate()» command is structured in a similar way to IncludeTemplate. Refer to this article for a detailed look on the different ways in which templates can connect to each other.
- When the code template is included using this command, then any of the paragraphs in the included template which contain no XpressDox fillpoints are removed from the document. This means that descriptive text, tables of contents, headings, etc. can be used in the body of the code template, and they will not be included in the merged document.
- The definition above does not mean that no text will be added to the merged document by a Code template. For example, if there is more than one command in a paragraph, then probably an empty paragraph will be added to the merged document. It is only paragraphs with no XpressDox fillpoints which will definitely be excluded from the merged result.
The IncludeCodeTemplate command would be used in the context described by the “Data capture interview layout tips” article