Navigation: Getting Started >

Templates

Send comments on this topic.

  

 

Templates allow you to create a common view for all or for a set of help topics in a specific output format. A template is a document which can be edited with the HelpSmith's word processor but unlike a regular topic, it usually contains document parts which are the same for the topics that will be built using this template during the compilation process. Usually, these are the parts such as the topic header, footer, and the main content part. The main content part is defined by the Topic Content Placeholder which must be inserted into the body of a template.

 

You can add an unlimited number of templates to your help project and you can control how a specific template is used. For example, a template can be set as the default template for a specific output format such as HTML Help, Web Help, PDF, ePub, or Markdown. Beside that, you can control which template should be used for individual help topics.

 

The Project Manager pane displays the templates of your help project under the "Templates" node. If you do not see the Project Manager pane, click the View tab and then click Project Manager.

 

Add a Template


1.On the Project tab, in the Topics & Templates group, click Add.

2.In the popup menu, click Add Template.

3.In the dialog, enter the title of the new template. Optionally, you can also select one of the presets.

4.Click OK.

 

Delete a Template


1.In Project Manager, select the template that you want to delete.

2.On the Project tab, in the Topics & Templates group, click Delete.

 

Rename a Template


1.In Project Manager, select the template that you want to rename.

2.On the Project tab, in the Topics & Templates group, click Rename.

3.Enter a new name for the selected template and press Enter.

 

Topic Content Placeholder


A template must contain a special Topic Content Placeholder object which will be replaced with the actual topic content during the compilation process. If a template does not contain a Topic Content Placeholder, it will be ignored during the compilation.

 

To insert a Topic Content Placeholder into a template:

1.In the Project Manager, click the template you want to edit.

2.In the word processor, put the cursor to where you want to insert the Topic Content Placeholder.

3.On the Insert tab, in the Placeholders group, click Topic Content.

 

Using Templates, Variables, and Other Objects


Since a template is a document which works the same way as a regular topic document, you can edit it using any objects such as variables, images, tables, hyperlinks, and so on. For example, it is useful to put the #TopicTitle variable in the heading area, so it will be dynamically replaced with the actual topic titles during the compilation process. Also, templates allow you to setup the Non-scrolling Area only once and eliminate the necessity to setup it for each topic.

 

Template Groups


If you have a big number of templates in your project, you can organize them into groups for your convenience. Actions to add, delete or rename a group are similar to the actions on templates. To move a template (or another group) into a group, you can use the drag-and-drop method, arrows on the Project tab in the Topics & Templates group, or you can use keyboard shortcuts Ctrl+Shift+Left Arrow, Ctrl+Shift+Up Arrow, Ctrl+Shift+Down Arrow, Ctrl+Shift+Right Arrow.

 

Set the Default Template For a Specific Output Format


You can set the default template which will be applied to the topics in a specific output format, as explained at the links below:

Set the Default Template For the HTML Help Format

Set the Default Template For the Web Help Format

Set the Default Template For the Printed Manual Format

Set the Default Template for the ePub Format

Set the Default Template for the Markdown Format

 

Related Topics


Help Project

Help Project Formats

Help Topics

Topic Properties

Media Repository

Keywords

A-Keywords

Text Variables



Copyright © 2007-2024 HelpSmith.com