You can use both Help & Manual's predefined variables and your own user-defined variables in your topics and topic headers. These are all displayed automatically in the Insert Text Variable dialog so you don't need to refer to a list to use them.
If you use HTML variables in your topics and headers only the plain-text portion of the variable value will be inserted. If the variable does not contain a plain-text portion nothing will be inserted.
The procedure is identical for predefined variables and user-defined variables. They are all displayed together in the same dialog:
Variables inserted with this method are displayed with a button-style highlight like this: Editing highlighted variables: Double-clicking on a variable opens the Insert Variable dialog with which you can change the variable to a different variable or access the Edit Variables dialog by clicking on More... |
Variables can also be typed in manually in topics and headers. They are evaluated automatically when you publish your output and work in exactly the same way as variables entered with the Insert Variable dialog.
Variables inserted with this method are not highlighted in the topic text and you cannot double-click on them to open the Edit Variables dialog. Also, if you make a mistake when you type the name of a variable it won't work! |
A number of the predefined variables in Help & Manual like <%NOW%> and <%TOPICLASTEDITED%> enter the current date or time or the date or time associated with an item in your project. Normally these variables will automatically use the date and time format set in your Windows configuration. However, you can also define the date format by adding a format string to the variable in parentheses like this: <%NOW(dddd, mmmm d, yyyy)%> See Date & time formatting in variables for details of the syntax. Note that this only works with variables that return date and time values, if you add format strings to any other variables the variable will no longer work. Also, you can only use this option by editing variables in the Help & Manual editor – you cannot use the date and time formatting syntax in variable definitions. |
See also:
Variables and Conditional Output (Reference)
Editing, formatting and disabling variables
Date & time formatting in variables
Page url: http://www.helpandmanual.com/help/index.html?hm_working_variables_intopics.htm