Use Variables in your Topics

A variable is a piece of content that can have many different values, and when you publish, you choose which value Paligo should use. For example, you can have a product name variable and when you publish, you choose which product name should be used in the published content.

To use variables in your topics, you first need to create a variable set. In the variable set, you define what variables you need, and the different possible values that they can have. Each set of possible values is called a variant.

To find out how to insert variables in a topic, watch this video or read the sections that follow:

To insert a variable in your content:

  1. Open the topic you want to add a variable to.

    Place the cursor in a valid position for a variable.

    usingvariables1_50.png
  2. Place the cursor in a valid position for a variable. You can insert variables into most types of text block, including para elements.

  3. Select Insert > Variable in the toolbar.

    usingvariables2_50.png

    A dialog opens, showing all of the variable sets you have available.

  4. Select the variable set that contains the variable you want to use. Alternatively, use the Search field to find the variable.

    usingvariables3_50.png
  5. Select the variable you want. In this case, we have selected "Product Name".

    usingvariables4_50.png

    The variable is inserted at the cursor position.

    usingvariables5_50.png

After adding a variable, you can use the Preview feature to choose different variants. These allow you to see what value Paligo will use for the variable for each different variant.

When you are ready to publish your content, you can choose which variant Paligo should use for the published output.

You can use Preview to see what values Paligo can use for your variables. This is useful for checking that the value you need is actually included in a variable set. If the value is not there, you will need to edit the variable set or create a new one.

To preview variables:

  1. Select Preview.

  2. Select Profile settings.

  3. On the Variables tab, select the variant that you want to preview in the topic. The variant is a collection of values, as defined in a variable set.

    profile-settings-variables.png

    Paligo updates the topic so that it shows the values that will be used with the variant you have selected.

    preview-variables-shown.png

When you publish your content, you can choose which values (variants) should be used for the variables in your content.

  1. In the Content Manager, select the options menu ( ... ) for the topic or publication you want to publish, and then select Publish.

  2. On the publish dialog, choose the type of output you want Paligo to create, and set the Languages and Profiling Attributes.

  3. Select the Edit option for Variables.

    select-edit-on-variables.png

    Paligo displays a list of all of the variable sets that are available.

    variables-list-publish.png
  4. For each variable set that is used in your topic or publication, select a variant. The variant's values will be inserted into the relevant variables in your content. Select OK to confirm.

    choose_a_variant.png
  5. Select Publish document to publish your content.