HTML templates are used to define the layout of all Help & Manual's HTML-based output formats (HTML Help, Browser-based Help, eBooks and Visual Studio Help). What you enter in the editor defines the content, the templates define the framework in which your content is presented. The HTML templates are stored together with your project, in the internal database in the main .HMX project file.
The same HTML templates are used for the topic pages in all three formats. In addition to this there are also separate templates for the Table of Contents and Keyword Index frames used in Browser-based Help to emulate the HTML Help viewer user interface.
| For instructions on using HTML templates see Using HTML Templates in the More Advanced Procedures section. |
HTML templates and help window types:
In Help & Manual HTML templates are linked to help window types. You select a template by selecting a help window type for a topic. The standard help window type and the default for all topics is Main, but you can define additional types yourself and each type has its own separate template, which is fully editable. For a better understanding of help windows and their relationship to templates please study Help Windows in the Reference section.
What you can do with HTML templates:
Normally you don't have to worry about the content of HTML templates. You can set some basic settings with a point-and-click interface in Project > Project Properties > Browser-based Help, but everything else is handled by the program in the background. (For details on the settings see Browser-based Help settings in the Reference section.)
However, if you are familiar with writing HTML code "by hand" you can edit all the HTML templates directly. This gives you full control over the appearance of your topics and allows you to change the page layout an any way you want, add features like headers and footers, use DHTML, ActiveX objects and JavaScript and so on.
| In Help & Manual eBooks only HTML formatting is supported in the HTML topic page template. The eBook viewer does not support any scripting, DHTML, ActiveX etc. |
Variables:
Help & Manual's HTML templates also support a wide range of variables. In addition to specialized predefined variables for HTML templates only, you can also use all the standard global predefined variables and your own user-defined variables in all HTML templates.
| See Variables in HTML templates for details on using variables in HTML templates. |
Conditional output:
You can also include or exclude code from your output with conditional tags, on the basis of both output format (HTML Help, Browser-based Help, eBooks etc.) and any of the user-defined include options defined in your project. In addition to this there are also a number of special conditional tags for HTML templates only, for example a condition that includes a block of code only if the current topic has a header.
You can use these tags to create different versions of your templates that are selected automatically depending on the output format or your own user-defined conditions. They can also be used in combination with variables so that you automatically only include variables in places and output formats where they are relevant.
| See Conditional output in HTML templates for details on how to use this feature in your HTML templates. |
Help & Manual's HTML templates:
There are four categories of HTML templates. The first category, topic page templates, are used for all HTML-based output formats (HTML Help, Browser-based Help, eBooks, Visual Studio Help/MS Help 2.0). The other three categories are only used for Browser-based Help.
The topic page templates (shared):
Topic page templates are used in all HTML-based output formats. There is only one set of topic page templates that are shared for all these formats. The templates can be accessed in all the Project Properties sections for these formats.
| • | Project > Project Properties > HTML Help > Topic Pages |
| • | Project > Project Properties > Browser-based Help > Topic Pages |
| • | Project > Project Properties > Visual Studio Help > Topic Pages |
Note that although you can access the topic templates in all these locations they are always the same templates. You cannot create different templates for the individual output formats!
These templates define all the layout settings for your topic pages in HTML Help, Browser-based Help, eBooks and Visual Studio Help/MS Help 2.0. The settings in your help window type definitions are also added to the templates (using automatic variables). In these formats the topic page template also stores the settings related to topic window appearance made in Project > Project Properties > Help Windows.
Each help window type has its own HTML topic page template that can be edited separately. This means that changing the help window type applies a different topic page template to the topic. The default help window type applied automatically to all topics in the TOC is Main. To apply a different help window type to a topic you must change the assignment in the Help Window: field in its Topic Options tab. See Using secondary windows for more details on this.
The table of contents template (Browser Help only):
Located in the Table of Contents section of the Browser-based Help settings. This template is only used in Browser-based Help. It defines the appearance and functionality of the TOC pane, emulating the HTML Help viewer as closely as possible.
The keyword index template (Browser Help only):
Located in the Keyword Index section. This template is also only used in Browser-based Help. It defines the appearance and functionality of the Keyword Index pane in the browser emulation of the HTML Help interface.
The full-text search template (Browser Help only):
Located in the Full-text Search section. This template is also only used in Browser-based Help. It defines the appearance and functionality of the Search pane in the browser emulation of the HTML Help interface. (Browser-based Help output includes a powerful full-text search function that uses full indexing for high-speed searching.)
See also:
Templates and Secondary Windows
Page url: http://www.helpandmanual.com/help/index.html?hm_ref_templates_html.htm