ClickHelp Documentation

Use Variables in Topic Title

You can use variables not only in a topic content but also in TOC node text and topic titles. Here is how you can do this.

Topic Title 

  • First of all, you should create a variable. To learn more, refer to this topic: Variables.
  • We've created the productName variable.
    A global variable created
  • To insert this variable to a topic title, we can use the following syntax: 
    HTML
    <ch:var name="productName" />

  • Open the nessesary topic and click the Rename button to rename it.
    Click the Rename button to rename the topic
  • Insert the variable using the syntax above.
    Add the variable markup to the Topic title in the topic properties
  • Click Save Changes.
  • Then you'll see the following.
    The variable in the topic title in the Author UI
  • This syntax will remain in this form in your project. The actual variable value will be inserted at the time of publishing.
    The variable value as a topic title in the Reader UI

Custom TOC Node Caption 

You can add a custom caption to make your topic title and the display text of a TOC node different:

  • Open your topic properties.
  • Insert a variable to the Custom caption field.
    Insert a variable to the Custom caption field in the topic properties
  • Click Save Changes.
  • Here is what you'll see.
    Variable and custom caption in the topic title in the Author UI
  • The actual result you'll see after publication.
    Variable and custom caption in the topic title in the Reader UI