Please enable JavaScript to view this site.

Navigation: More Advanced Procedures > Using Variables

Where you can use variables

Scroll Prev Top Next More

The following table provides a quick reference showing where you can use which kinds of variables.

You can use both HTML variables and plain text variables in all locations. However, whether or not it makes sense to use HTML variables in all locations depends on the code you use, of course! In output formats not based on HTML (PDF, DOCX, printed manuals) the text portion of the variables will be extracted automatically.

Location:

Supported variables:

Topic text and headers

Plain-text variables:

Global predefined variables and user-defined variables inserted with the BTN_Insert_Variable Text Variable tool in Write > Insert Object:

<%VARIABLE_NAME%>

Note that variables typed in manually are not highlighted in the editor and double-clicking on them will not open the variable selection list.

HTML variables:

HTML variables inserted in these locations will only insert the text portion of the HTML code. For example, if the variable contains:

<a href="https://www.helpandmanual.com>EC Software Website</a>

only "EC Software Website" will be inserted. All the HTML code (blue) will be stripped out.  If there is no plain-text portion nothing will be inserted.

TOC, keywords, image captions, link captions, macros in macro links

Plain-text variables:

Global predefined variables and user-defined variables inserted manually by typing the variable names using the syntax <%VARIABLE_NAME%>.

HTML variables:

In these locations only the plain-text portion of HTML variable values will be inserted (see example above).  If there is no plain-text portion nothing will be inserted.

HTML code objects and scripts in script links

Plain-text variables:

Global predefined variables and user-defined variables can be used in code objects and script link scripts directly. The variables must inserted manually by typing the variable names using the standard syntax <%VARIABLE_NAME%>.

HTML variables:

HTML variables will generally work as expected in these locations, inserting the full HTML code stored in the variable. You can also use most of the exclusive HTML template variables here, with a couple of logical exceptions:

HTML template variable exceptions:

The following HTML template variables can't be used in code objects because they can only be evaluated when they are used directly in the HTML template:

DOCTYPE, GAACCOUNT

HTML templates

Plain-text variables:

Global predefined variables, user-defined variables and special HTML template variables inserted manually by typing the variable names.

HTML variables:

You can use HTML variables without restriction in HTML templates. The HTML code stored in the variable will be inserted in the in the template. You can also use HTML template variables as part of the value of the HTML variable.

PDF templates edited with Manual Designer

Plain-text variables:

Global predefined variables, user-defined variables and special PDF template variables inserted manually by typing the variable names.

HTML variables:

HTML variables will only insert the plain-text portion of the variable value in PDF templates. If there is no plain-text portion nothing will be inserted.

See also:

Variables and Conditional Output (Reference)