Navigation:  More Advanced Procedures > Using HTML Templates >

Editing HTML templates

Print this Topic Previous pageReturn to chapter overviewNext page
Show/Hide Hidden Text

All the various HTML templates used in your projects can be edited directly in the Configuration section of your project where they are stored. Help & Manual has an integrated HTML code editor with syntax highlighting, search and replace and spell checking.

Editing HTML templates requires familiarity with HTML:

You must be familiar with manual HTML coding to edit the HTML templates yourself. Your code is also entirely your own responsibility – it is not syntax-checked in any way by Help & Manual. Only delete or change code in the standard templates if you really understand what you are doing, otherwise you may experience unexpected errors and malfunctions in your output!

When making code changes it is good practice to publish regularly to test the results of your changes, otherwise it can be difficult to localize identify the changes that are causing a specific problem.

Template locations

Topic page templates:

In the Project Explorer go to Configuration > HTML Page Templates to edit the templates for your topics. By default there is just one template called Default that is used for all topics. However, you can define additional templates and assign them to individual topics in the tab, in the HTML Page Template: field.

These templates are used for all HTML-based output formats. The same templates are used for all formats, you cannot define different templates for specific output formats.

Webhelp templates:

In the Project Explorer go to Configuration > Publishing Options > Webhelp to edit the additional templates for the help frameset (Layout), Table of Contents, Keyword Index and Search panes in your Webhelp output.

How to edit HTML templates

All the templates have two editing modes, in two tabs. In the simple mode tab you can make a number of changes without actually having to edit the HTML code directly. This is recommended for most users. The HTML code tab gives you direct access to all the code of the template you should only use this option if you have experience with editing HTML and CSS code.

Simple editing mode:

Note that the Simple Template Layout tab is only available for the standard Default template. All additional topic page templates you create can only be edited in HTML Source Code mode.

1.Select the template you want to edit then select the Simple Template Layout tab in the editor window.

2.Make your changes and additions, then save your project to save your changes.

See HTML Page Templates and Webhelp in the Reference section for details on the settings for each template type.

Editing the HTML code:

Note that user-created HTML page templates can only be edited in HTML Source Code mode.

1.Select the template you want to edit then select the Edit HTML Code tab in the editor window.

2.Edit the template in the editor window displayed. The editor supports syntax highlighting to make editing easier. See the other sections in this chapter for details on the contents of the different template types.
3.When you are finished save your project to store your changes.

The changes will be applied immediately but most of them may only be visible in your compiled output. However, any background colors you set for your topic body and header will be displayed in the editor directly.

See also:

Templates and Secondary Windows

Help Windows (Reference)

 


Page url: http://www.helpandmanual.com/help/index.html?hm_advanced_htmltemplates_editing.htm