Topic and project templates

Topic and project templates facilitate the creation of a new help topics, because they allow you to incorporate into your current project, not only selected predefined topic style, but also all the scripts, images, videos and other files used in a topic (or project) template.

In this chapter you will learn how templates are defined in the product and how you can add your own templates.


Topic templates

Topic templates are located in Templates\_Topics subfolder of the Precision Helper.

For default installation on Windows 2000/XP it is a folder:
"C:\Documents and Settings\%UserName%\AppData\Precision\precisionhelper\Templates\_Topics"

For default installation on Windows Vista (and newer) it is a folder:
"C:\Users\%UserName%\AppData\Roaming\Precision\precisionhelper\Templates\_Topics"

Under the _Topics folder all the files and subfolders can be stored completely arbitrary, but you must follow the two rules:

You can take a look at the definition of a few basic templates, that are included in the installation of Precision Helper, and you can try the creation of a new topics from them, so you can better understand the principles of their function.

The easiest way, how to create your own template, is to use an option called "Save as template" in a topic page (under the "Select a topic" button). You can create a temporary help project for your templates, so you can edit them as a standard topics, and then you can save them for usage via the option mentioned above.


Project templates

Project templates are located under the Templates\_Projects subfolder of the Precision Helper.

All the files with .HHP suffix (MS Html Help projects) are accepted as templates. To distinguish different language versions, template file names should contain two suffixes - language code identifier and the .hhp extension itself. For example: myproject.en.hhp.

Unlike for topic templates, here is not needed to define a special configuration file. When a new project is created from the template, all the files from the template folder (and its subfolders) are copied to the location you choose, and the project file is renamed to the title you enter.

Thanks to the principle mentioned above, you cannot share the image files, style sheets, scripts, etc., between the project templates.

The easiest way, how to create your own project template, is to copy the content of your selected project folder into the templates folder - ie. Templates\_Projects\MyTemplate.