You can use all global predefined variables and user-defined variables in all HTML templates. In addition to this there are a number of special HTML template variables, which are only relevant in HTML templates.
In addition to these variables you can also use predefined and user-defined conditional switches to include or exclude content on the basis of conditions. This is particularly useful for variables, which are often only relevant in certain contexts. For details see Conditional output in HTML templates.
When you are using a skin remember that variables can be stored either in your project or in the skin. However, if you create variables with the same name in both the project and the skin, the value defined in the skin will be used.
You can use all your user-defined variables in HTML templates, including HTML variables for inserting HTML code. Just type in the variable in the position where you want to use it in the standard format, complete with the opening <% tag and the closing %> tag.
<br /><br />
<br /><hr />
<br /><hr />
The above example inserts the contents of the user-defined variable between horizontal rules above the topic text on every page.
You can make these variables available for use in your scripts in your templates by loading this file prior to referencing the variables, like this:
The variables are stored in an object called hmConfigVariables and the variables themselves are stored in all upper case. So if you have a variable called PROJECTVERSION you would reference it as:
The values are always strings. If you want to use the values as numbers, Boolean values etc. you need to convert them before using them.
You can use both the global variables and the special HTML template variables. They are used just in the same way as user-defined variables. Just type them into the template in the position where you want to use them. Always type the variables exactly as shown in the variable lists, complete with the opening <% tag and the closing %> tag.
The above example inserts the web URL of the current page at the bottom of every topic page in WebHelp. (This makes it easy for support staff to give users the address of specific help topics in the online version of your help.)
1.Use your user-defined or global variables normally in your HTML template. (This is particularly useful for HTML variables!).
2.Select the topic where you want the variable to have a different value. Select the Topic Options tab on the left of the main editor window and add the variable and its new value in the Topic Variables section.
See The power of editable variables for more detailed instructions.
Editing HTML templates
Global predefined variables (reference list)
HTML template variables (reference list)
Conditional output in HTML templates
The power of editable variables