A topic content template is an XML file containing the "framework" of a topic – it is used to create topics with repetitive content, for example identical tables and headings and so on.
Topic content templates can contain everything that a topic can contain, including tables, formatted text, graphics, links and so on. You can create as many content templates as you like and load them with you create topics with standard layout that you use repeatedly. You can also create content templates that are loaded automatically when you create new topics.
filename.template.xml The .template. part of the name is essential, it identifies the XML file as a template. Templates must be stored in the current project directory and must use this naming syntax. Examples: intro.template.xml
|
To create a new topic with a template:
Note that the template will only appear in the Topic Template: field for selection if it is stored in your project directory using the filename.template.xml naming syntax (see above for details). To load a template into an empty topic:
Don't try to load a template into an existing topic, this will overwrite the entire contents of the topic! |
When you create topic templates to use for creating new topics you can include a special variable in the header that will automatically insert the topic caption (the title of the topic you enter in the Add Topic dialog) in the header of the topic. If you don't use this variable the template will be loaded with the header saved with the topic.
%TEXT%
You can also include other text and elements in the header, including graphics. Only the variable is replaced when a new topic is created. This only works when you create a new topic with a template. The %TEXT% variable is not translated when you load the template into a empty topic with File > Load Topic from File in Project > Manage Topics. |
If you frequently use topics with different standard styles you could create a separate template for topics with each set of styles already preset in the topic header and body. Then you just need to select the appropriate template when you create a new topic (see above). |
See also:
Exporting and importing topics
Page url: http://www.helpandmanual.com/help/index.html?hm_advanced_templates_topicscontent.htm