You can use all of Help & Manual's standard conditional output options in HTML templates, both your user-defined include options and options based on the current output format. In addition to this there are a few special conditional switches which are only for use in Webhelp output, because they are only relevant there. See the lists below for details.
These conditions are used to enclose blocks of HTML code in your template that you want to include in the output only if the condition is fulfilled. The condition tags themselves are never included in your output code, they are always stripped from the code before publishing.
Conditions based on the output format are only relevant in the HTML topic page templates which are used in HTML Help, Webhelp, eBooks and Visual Studio Help / MS Help 2.0. The TOC, search and keyword index templates are only used in Webhelp so it does not make sense to use format-based conditions there since the output format is always Webhelp.
For more information on the available output conditions, variables and how to use them see the following topics: |
Like most HTML tags each condition has an opening tag and a corresponding closing tag, using the same </ syntax to identify the closing tag as all regular tags. Simply enclose the code you want to include conditionally between the two tags. Note that the ELSE condition is not available in HTML templates. Examples: <IF_TOPIC_HEADER> <IFNOT_PREVIOUS_PAGE>This text will only be displayed in <IF_NEXT_PAGE> The last example only displays the link if there is a next topic to jump to. |
Basically this is exactly the same as using the predefined include options, you just have to use the following syntax rules to create your conditional switches from the names of your include options in Configuration > Common Properties > Custom Builds: Syntax:
Examples: This example shows how to use the user-defined include options ALPHABUILD and BETABUILD: <IF_ALPHABUILD> |
See also:
HTML template output conditions (reference list)
Page url: http://www.helpandmanual.com/help/index.html?hm_advanced_htmltemplates_conditions.htm