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, or ePub. 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.
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 the HTML Help Format
1.On the Project tab, in the Project group, click Project Options.
2.In the Project Options dialog, in the left sidebar, select HTML Help.
3.Set the option in the Default Topic Template box to Use template.
4.Click the Change button and select the template you want.
5.Click OK.
Alternatively, you can right-click on the template in the Project Manager pane and select Use As|Default HTML Help Template in the popup menu.
The default template selected for the HTML Help format will be applied to all help topics when you compile an HTML Help system. However, individual help topics can override this setting and use a different template or no template.
Set the Default Template For the Web Help Format
1.On the Project tab, in the Project group, click Project Options.
2.In the Project Options dialog, in the left sidebar, select Web Help.
3.Set the option in the Default Topic Template box to Use template.
4.Click the Change button and select the template you want.
5.Click OK.
Alternatively, you can right-click on the template in the Project Manager pane and select Use As|Default Web Help Template in the popup menu.
The default template selected for the Web Help format will be applied to all help topics when you compile a Web Help system. However, individual help topics can override this setting and use a different template or no template.
Set the Default Template For the Printed Manual Format
1.On the Project tab, in the Project group, click Project Options.
2.In the Project Options dialog, in the left sidebar, select Printed Manual.
3.Set the option in the Default Topic Template box to Use template.
4.Click the Change button and select the template you want.
5.Click OK.
Alternatively, you can right-click on the template in the Project Manager pane and select Use As|Default Printed Manual Template in the popup menu.
The default template selected for the Printed Manual format will be applied to all help topics when you compile a Printed Manual. However, individual help topics can override this setting and use a different template or no template.
Set the Default Template for the ePub Format
1.On the Project tab, in the Project group, click Project Options.
2.In the Project Options dialog, in the left sidebar, select ePub eBook.
3.Set the option in the Default Topic Template box to Use template.
4.Click the Change button and select the template you want.
5.Click OK.
Alternatively, you can right-click on the template in the Project Manager pane and select Use As|Default ePub eBook Template in the popup menu.
The default template selected for the ePub format will be applied to all help topics when you compile an ePub eBook. However, individual help topics can override this setting and use a different template or no template.
Related Topics
Copyright © 2007-2023 HelpSmith.com