Navigation: Getting Started >

Templates

Send comments on this topic.

 

 

Templates are a powerful feature allowing you to create a custom look for all or only for a set of help topics. 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. Usually, these are the parts such as the topic header and footer. The actual topic content is specified by the Topic Content Placeholder inserted into the body of a template.

 

HelpSmith allows you to 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, or Printed Manual. Also you can control which template will be used for a specific help topic when it is exported to a specific help format.

 

The templates of your help project are listed on the topics pane (View|Topics) under the "Templates" node.

 

Adding a Template

1.On the menu, click Topics|New Template.

2.At the dialog-box, specify the title of the new template. Using the Create As parameter, you can also select from one of the presets on which your new template will be based.

3.Then click OK.

 

Deleting a Template

1.Select the required template on the topics pane.

2.Then use the menu command Topics|Delete.

 

Renaming a Template

1.Select the required template on the topics pane.

2.On the menu, click Topics|Properties.

3.At the dialog-box, specify a new template title.

4.Then click OK.

 

Using Groups

If you have a big number of templates in your project, you can organize them into groups for your convenience. Groups can be created the same way as groups for help topics. For more information on working with groups, click here.

 

Setting the Default Template For the HTML Help Output Format

1.On the menu, click Project|Options.

2.On the left sidebar, select HTML Help.

3.On the right part of the dialog-box, set the option in the Default Template box to Use template. Then click the Change button, select the required template and click OK in the template browser dialog-box.

4.Then click OK in order to apply the modified parameters and close the Project Options window.

 

Alternatively, you can simply right-click on the required template in the Topics pane and set the option Use as Default HTML Help Template in the popup menu.

 

The default template set for the HTML Help format will be applied to all topics of your help project when you compile an HTML Help system. Individual help topics can, however, override this setting and either not to use a template at all or use a different template.

 

Setting the Default Template For the Web Help Output Format

1.On the menu, click Project|Options.

2.On the left sidebar, select Web Help.

3.On the right part of the dialog-box, set the option in the Default Template box to Use template. Then click the Change button, select the required template and click OK in the template browser dialog-box.

4.Then click OK in order to apply the modified parameters and close the Project Options window.

 

Alternatively, you can simply right-click on the required template in the Topics pane and set the option Use as Default Web Help Template in the popup menu.

 

The default template set for the Web Help format will be applied to all topics of your help project when you compile a Web Help system. Individual help topics can, however, override this setting and either not to use a template at all or use a different template.

 

Setting the Default Template For the Printed Manual Output Format

1.On the menu, click Project|Options.

2.On the left sidebar, select Printed Manual.

3.On the right part of the dialog-box, set the option in the Default Template box to Use template. Then click the Change button, select the required template and click OK in the template browser dialog-box.

4.Then click OK in order to apply the modified parameters and close the Project Options window.

 

Alternatively, you can simply right-click on the required template in the Topics pane and set the option Use as Default Printed Manual Template in the popup menu.

 

The default template set for the Printed Manual format will be applied to all topics of your help project when you compile a Printed Manual. Individual help topics can, however, override this setting and either not to use a template at all or use a different template.

 

Topic Content Placeholder

A template document must include a special Topic Content Placeholder which will be used by HelpSmith to build the final topic document during the compilation process. In other words, the Topic Content Placeholder will be replaced with the actual topic content. Templates which do not contain a Topic Content Placeholder are ignored during the compilation.

 

To insert a Topic Content Placeholder to a template:

1.Open the required template by selecting it on the Topics pane.

2.In the text editor, put the caret to where the placeholder should be inserted.

3.On the Insert menu, click Topic Content Placeholder.

 

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 often useful to put a Topic Title variable to the header, so it will be dynamically replaced with the actual topic titles during the compilation process.

 

Also, templates allow you to set the Non-scrolling Area only once and eliminate the necessity to set it for each and every topic. Moreover, by using different templates for different output formats, you can achieve, for example, that the Non-scrolling Area will be used in HTML Help and will not be used in Web Help, and vice versa.

Copyright © 2007-2013 HelpSmith.com