HTML template output conditions

  Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic! Mail us feedback on this topic!  

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 Help & Manual's Webhelp output, because they are only relevant there. See the lists below for details.

These conditions are like special HTML tags. They 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.

In HTML templates you can only use output format conditions for HTML-based output formats (CHM, HTML, EBOOK and HXS). This is because these templates are only used for HTML-based output so <IF_PDF> would not have any meaning, for example.

Conditions are stripped before publishing

All the condition tags are stripped from your code before actually generating the HTML output. No proprietary tags are included in your output!

Predefined HTML template conditions:

In addition to the predefined conditions listed here you can also use your own user-defined include options as conditions in HTML templates. See Conditional output in HTML templates for details on how to use the conditions.

Conditions

Function of the condition

<IF_TOPIC_HEADER>

True if the current topic has a header and the header is not empty (the variable <%TOPIC_HEADER%> is not equal to "").

<IF_PREVIOUS_PAGE>

True if a previous page exists (the variable <%HREF_PREVIOUS_PAGE%> is not empty). Used to suppress or display a grayed-out version of the Previous navigation button in the very first topic.

<IF_NEXT_PAGE>

True if a next page exists. Used to suppress or display a grayed-out version of the Next button in the very last topic.

<IF_INDEX_PAGE>

True if a keyword index is included in the output. Only relevant for Webhelp.

<IF_SEARCH_PAGE>

True of full-text search is included in the output. Only relevant for Webhelp.

<IF_FRAMES>

True if Webhelp is exported with frames (a frame-based format is selected in the Navigation options). This could be used for entering a link from topic pages to your TOC page when you select the No Frames, No Scripts layout option, for example. Only relevant for Webhelp.

<IF_TOPIC_BREADCRUMBS>

True if the <%TOPIC_BREADCRUMBS%> variable is not empty (see HTML template variables). For example, this variable is always empty in topics in the Invisible Topics section and in top-level topics.

<IF_HTML>

True when you generate Webhelp (HTML)

<IF_CHM>

True when you generate HTML Help

<IF_HXS>

True when you generate Visual Studio Help / MS Help 2.0

<IF_EBOOK>

True when you generate e-Books

<IF_TOGGLES>

True if the current topic contains one or more toggles (expanding text and images).

 

"IFNOT" versions negate the meaning of the conditions:

Exclude Conditions

Function of the exclude condition

<IFNOT_TOPIC_HEADER>

Negates the positive version of the condition.

<IFNOT_PREVIOUS_PAGE>

Negates the positive version of the condition.

<IFNOT_NEXT_PAGE>

Negates the positive version of the condition.

<INOTF_INDEX_PAGE>

Negates the positive version of the condition.

<IFNOT_SEARCH_PAGE>

Negates the positive version of the condition.

<IFNOT_FRAMES>

Negates the positive version of the condition.

<IFNOT_TOPIC_BREADCRUMBS>

Negates the positive version of the condition.

<IFNOT_HTML>

Negates the positive version of the condition.

<IFNOT_CHM>

Negates the positive version of the condition.

<IFNOT_HXS>

Negates the positive version of the condition.

<IFNOT_EBOOK>

Negates the positive version of the condition.

<IFNOT_TOGGLES>

Negates the positive version of the condition.

See also:

User-defined include options

Using HTML Templates

Conditional output in HTML templates

Help Windows

Page url: http://www.yourdomain.com/help/index.html?hm_ref_variables_conditions.htm