Where you can use variables

<< Table of contents | Navigation:  More Advanced Procedures > Using Variables >

Where you can use variables

Previous pageReturn to chapter overviewNext page

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, RTF, 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="http://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.

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 inserted manually by typing the variable names.

Important: You cannot use HTML template variables in HTML code objects or script links because the code objects are parsed together with the topic content, before it is inserted in the template.

HTML variables:

You can use HTML variables in HTML code objects and scripts in script links. However, don't use HTML template variables as part of the variable value because they won't be parsed (see above).

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)