Please enable JavaScript to view this site.

You can use all global predefined variables and user-defined variables in HTML templates. In addition to this you can also use the following special predefined variables, which are only relevant in HTML templates.

Variables for use in topic page templates only:

These variables can only be used in topic page templates. They are valid in all HTML-based output formats (HTML Help, WebHelp, Windows Exe and ePUB eBooks and Visual Studio Help).

Variable

Content and/or function of the variable

Note on HREF-Variables:

All the HREF variables insert the local names of the corresponding pages within the current directory without any path information, e.g. topic1name.htm, topic2name.htm and so on.

<%DOCCHARSET%>

Inserts the correct character set information in the meta tags at the beginning of the HTML output pages. This variable is essential in all templates and should not be removed. If you do remove it you will get an error message from the compiler.

<%DOCTYPE%>

Inserts the correct DOCTYPE tag at the beginning of the HTML output pages. This variable is essential in all templates and should normally not be removed. If you do remove it you will get an error message from the compiler.

You can insert your own <DOCTYPE> declaration in the template explicitly and if you do this no error message will be displayed. However, it may produce unexpected results.

<%GA4ACCOUNT%>

Filled with the value specified for the for your new Google Analytics 4 (GA4) Google Analytics account (your tracking ID).

<%GAACCOUNT%>

Filled with the value specified for the for your old Universal Analytics Google Analytics account (your tracking ID).

<%HM_LINKLIST_SIBLINGS%>
<%HM_LINKLIST_CHILDREN%>
<%HM_LINKLIST_ANCHORS%>

These variables can be used in the topic HTML page template. They insert UL link lists:

SIBLINGS: All the siblings of the current topic.

CHILDREN: All the children of the current topic.

ANCHORS: Anchors in the current topic.

Not for use in V3 and V4 skins:
Note that you can't use these variables in the page templates for Premium Pack V3 and V4 skins. Since topic content is loaded dynamically in these skins, variables set in the template don't change.

<%HREF_CURRENT_PAGE%>

Link address of the current page.

<%HREF_DEFAULT_PAGE%>

Link address of the "Default" topic. This is used for the standard Top navigation link in the topic headers so that users can return to the default topic in your project.

<%HREF_NEXT_PAGE%>

Link address of the next topic.

<%HREF_PARENT_CHAPTER%>

Link address of the parent topic (chapter). This can be used as an alternative to <%HREF_DEFAULT_PAGE%>.

If the parent is a chapter without text, this is the link address of the parent's parent. If no valid parent is available, the variable is the link address of the default page.

<%HREF_PREVIOUS_PAGE%>

Link address of the previous topic (used for Previous/Next buttons).

<%STYLESHEET%>

Inserts the reference to the CSS stylesheet containing all the styles information for your project. This variable is essential in all templates and should not be removed. If you do remove it you will get an error message from the compiler.

<%TOPIC_AKEYWORDS%>

Inserts all the A-keywords of the current topic, comma-separated.

<%TOPIC_BREADCRUMBS%>

Generates a series of "breadcrumb trail" navigation links to topics above the current topic in the TOC tree. This variable is empty in top-level topics. In second-level topics and below the variable generates a series of links in the format Link1 > Link2 > Link3 ...

The current topic is not included in the series. If you want to place the current topic title at the end of the breadcrumb trail you can do so with the Graphics in HTML templates variable (see below).

The breadcrumb trail variable is empty in topics in the Invisible Topics section.

This variable has a matching condition pair: <IF_TOPIC_BREADCRUMBS> and <IFNOT_TOPIC_BREADCRUMBS>. These conditions can be used to only insert the trail where it is relevant and to insert alternative content when it is not relevant.

See here for details on how to use this variable.

<%TOPIC_HEADER%>

Inserts the header of the current topic if it exists. If the current topic has no header the value of this variable is null. This can be different from the topic caption inserted with <%TOPIC_TITLE%>.

<%TOPIC_HEADER_TEXT%>

Inserts the header of the current topic as plain text. This is particularly useful if your project headers are different from and longer than the TOC captions, which is inserted with <%TOPIC_TITLE%>.

This is used primarily for search engine optimization, for which you would insert it in the description meta tag, like this:

<meta name="description" content="<%TOPIC_HEADER_TEXT%>">

<%TOPIC_DESCRIPTION%>
<%TOPICMETA:DESCRIPTION%>

Inserts the text from the Description field in the topic's Topic Options tab if you have entered a description there. Otherwise it inserts the first 177 characters of the topic text, followed by an ellipsis (...).

This can be used in combination with the "featured image" (see next row) to insert a "title" image and a description for your topic in your template.

In addition to this it can also be used to populate the description meta tag for search engines like this:

<meta name="description" content="<%TOPIC_DESCRIPTION%>">

<%TOPICMETA:PICTURE%>
<%TOPIC_PICTURE%>

Returns the file name of the "featured image" for the current topic, if one has been set in the topic's Topic Options. Returns blank if no featured image has been set.

<%TOPIC_KEYWORDS%>

Inserts all the keywords of the current topic, comma-separated. Needless to say, this variable is essential for the keyword index and shouldn't be removed...

<%TOPIC_TEXT%>

Inserts the body text of a topic, i.e. the entire topic as edited and formatted in your project in the Help+Manual editor. This is the most important variable. If you leave it out your topics will be empty!

<%TOPICTITLE%>

Title text of the current topic. This is taken from the Title Tag: field in the Topic Options tab (on the left of the editor window) and is normally the same as the TOC caption for the topic and will change automatically when you edit the TOC caption in the TOC. So this variable gives you the TOC caption, unless you edit the Title Tag field

Editing the Title Tag text in Topic Options:
Editing the Title Tag: field manually "uncouples" this field from the TOC caption. The variable then still returns the contents of the field in Topic Options, so if you want to use it for the TOC caption we recommend not editing the field in Topic Options.

To "recouple" the Topic Options field with the TOC caption, just edit either so that the texts are both identical. This works the same as the coupling between the TOC caption and the topic header text.

Deprecated older version:
The older <\%TOPIC_TITLE%> version of this variable is still supported and does not need to be changed in your projects. However, please always use the current <%TOPICTITLE%> version now.

<%TOPIC_TITLE_PATH%>

This variable is similar to the breadcrumbs variable above but it delivers the breadcrumb trail as a plain text string without any links. Unlike the breadcrumbs variable it also includes the name of the current topic, so it always delivers a full trail.

The primary use of this variable is for search engine optimization, for which you would insert it in the <title> tag of your topic page template instead of the normal <%TOPIC_TITLE%> variable, like this:

<title><%TOPIC_TITLE_PATH%></title>

Modification for HTML Help:

If you also output to HTML Help you should use conditional text to ensure that this variable is only used in Browser Help, otherwise you will get the full path as the topic name in your search results in the HTML Help viewer. Do it like this:

<title><IF_HTML><%TOPIC_TITLE_PATH%></IF_HTML><IF_CHM><%TOPIC_TITLE%></IF_CHM></title>

<%TOPICID%>

Returns the plain topic ID as written in the Topic ID: field of , without any filename  extension and without changing the ID text to lower case. This can be used to add an ID reference in your meta attributes in your web pages, for example:

<meta name="id" content="<%TOPICID%>" />

(This variable can also be used in normal topic pages.)

<%XMLLANG%>

Returns the project language code, e.g. en-us for US English.

Variables for use in WebHelp only:

All the remaining variables are only relevant in WebHelp (HTML):

Variables for WebHelp 3 mode only:

In WebHelp 3 mode, the JavaScript files, graphics and video files and CSS files are all saved in sub-folders of the main WebHelp folder. You can use these variables in your HTML templates to automatically insert the relative paths to these folders.

Variable

Content and/or function of the variable

<%HM_RELPATH_JAVASCRIPT%>

Returns the relative path to the JavaScript files folder:

./js/

<%HM_RELPATH_IMAGES%>

Returns the relative path to the images and media files folder (video files are also stored here):

./images/

<%HM_RELPATH_CSS%>

Returns the relative path to the CSS files folder:

./css/

Global variables for all WebHelp templates:

Variable

Content and/or function of the variable

<%HREF_CONTENT_PAGE%>

Link address of the TOC page

<%HREF_INDEX_PAGE%>

Link address of the keyword index-page

<%HREF_SEARCH_PAGE%>

Link address of the full-text search page

<%HREF_TOP_PAGE%>

Link address of the top frame (e.g. "index.html")

Variables for the Layout frameset template only:

Variable

Content and/or function of the variable

<%HREF_CONTENT_PAGE_DYN%>

Link address of the dynamic TOC page.

<%HREF_CONTENT_PAGE_STATIC%>

Link address of the static TOC page.

<%NAVIGATION_SCRIPT%>

Inserts the navigation script required by the top frame.

Variables for the Table of Contents template only:

Variable

Content and/or function of the variable

<%TABLE_OF_CONTENTS%>

Inserts the entire TOC in the page.

 

Variables for the Keyword Index template only:

Variable

Content and/or function of the variable

<%KEYWORD_INDEX%>

Inserts the entire keyword index in the page.

 

Variables for the Search template only:

Variable

Content and/or function of the variable

<%SEARCH_SCRIPT%>

Inserts the full-text search script in the page.

See also:

Using Variables

Using HTML Templates

Editing HTML templates

Help Windows