Types of HTML templates

Navigation:  More Advanced Procedures > Using HTML Templates >

Types of HTML templates

Previous pageReturn to chapter overviewNext page

Show/Hide Hidden Text

There are two categories of HTML templates: The HTML topic page templates that define your topic pages in all HTML-based output formats and an additional group of HTML templates used to define the additional components of WebHelp output.

flag_green        Key Information

If you are publishing with a skin you must edit the templates in the skin, not in your project! Skins always replace all the HTML templates in your project. Changes made in HTML templates your project will not be reflected in your output when you use skins!

HTML topic page templates:

These are the templates for your topics and they are used for all HTML-based output formats. They define everything in your topic pages except the topic content. They are stored in Configuration > HTML Page Templates.

Additional templates for WebHelp:

In addition to this there are also separate templates for the main index.html page and the Table of Contents, Keyword Index and Full-text Search pages used in WebHelp to emulate the HTML Help viewer user interface. These templates are stored in Configuration > Publishing Options > WebHelp.

Special script and CSS components information for experts:

If you are experienced in HTML, CSS and JavaScript coding please refer to Script and CSS components for experts. This topic contains important information on how the references to important script and other components in the templates are managed and how you can manipulate them.

 

Click to expand/collapseWhich HTML templates are used where and when...

The WebHelp Layout template contents depend on the layout option chosen

The contents of the layout template change depending on whether you choose "Integrated", "Classic 2 Frames" or "Classic 3 Frames" in Configuration > Publishing Options > WebHelp > Layout. In the Integrated version, HTML5 is used and the topic and navigation pages are loaded in modern iFrames. The Classic versions use a traditional frameset (now deprecated) and load the topic and navigation pages into conventional frames. The same JavaScript files are used in all three versions, however.

The "No Frames" option disables the Layout template

The layout template is not used at all if you choose the "No Frames" option. Then the Table of Contents template is set as the main index.html file and the contents of the layout template are irrelevant for your output because the template is not present.

HTML Topic Page templates are (almost) always used.

The topic page templates in Configuration > HTML Page Templates are used by almost all HTML-based output formats (CHM, WebHelp, EXE eBooks and Visual Studio Help 2008 and 2010). The Topic Page Template contains a script that automatically loads the full WebHelp user interface if a topic is opened on its own (for example from a search engine link) but you can turn this off if you want.

Exception: iBooks/ePub
The only exception is the Apple iBooks/ePub eBooks format, which uses a special hard-wired topic page template that cannot be edited. The requirements for ePub in general and iBooks in particular are so strict and specialized that this template should not be edited and is not generally accessible. (If you really want to bite the bullet and design your own topic page template for ePub send us a mail and we will help you out. There is an undocumented way to do this...)

The WebHelp Table of Contents, Index and Search templates are always the same

The contents of the WebHelp Table of Contents, Index and Search templates remain unchanged no matter which layout option you choose. They are just loaded into different frames depending on your layout choice.

If you choose the "No Frames" option The TOC template is used as the main index.html file. It contains script that identifies whether it is loaded in a frame or on its own and responds accordingly.