- Paligo Documentation
- Content Reuse
- Variables
Variables
Variables allow you to swap out small parts of content for different publications. They are very useful when you have topics that you want to reuse, but need to have parts of the text changed, such as product names.
For example, let's say you have a topic and you insert the product name "Acme 100" as plain text. By adding it as plain text, you have limited where the topic can be reused, as it is specific to the "Acme 100" and so cannot be used for other products. But if you use a variable to set the product name, you can reuse the topic and tell Paligo which product name to use each time you publish.

In Paligo, there are several types of variable that you can use:
-
Text: for plain text that does not need to be translated, such as product names, number values, etc.
-
Text (translatable): this variable type will let you enter translations of each variable value (for the languages you have selected). If you use this type of variable, remember that different languages can have very different grammars. Translated variables can read badly if the grammar, gender, etc., of each language has not been considered.
-
Image: these variables allow you to swap out images. They are useful when you have topics that contain images that need to be changed for different variants or publications. It is often more convenient to have a variable for the image, rather than many images with filtering.
-
XML: these variables are similar to plain text variables, but allow you to add XML tags too, so you can include inline tags if needed.
-
Dynamic text variables: These are a special type of variable, and you can use them for inserting things like today's date or for inserting the content from an element that is elsewhere in the publication. They are different to other variable types as you do not create them in variable sets. Read more about them in Dynamic Text Variables.
To use variables in your topics and publications, follow this process:
-
Create a variable set. This is a collection of variables and the possible values that they can contain.
-
In the variable set, add variables for each type of information that needs to change in different scenarios.
-
Create variants for the variables. A variant is a collection of values that will be inserted into the variables when you publish. For example, if you have a product name variable, you could have a variant where the product name is "ACME 100X" and you could have another variant where the product name is "ACME 200X". Think of each variant as the values that will be used in one particular scenario.
You can skip this step if you already have suitable variable sets available in Paligo.
-
-
Insert variables into your topics where appropriate.
-
Preview the variables to check that they are providing the correct information.
-
Publish your content and choose the variants that Paligo should use.
Note
The process is different for Dynamic Text Variables.
You can use variables for many different types of changeable content, but one of the most popular uses is for product names and company names. With these, you may want to add superscript text to the variable, for example, to add a trademark TM after the product name.
To add superscript text to a variable:
-
Create or edit a variable set (see Create a Variable Set).
-
In the variable set, create an XML variable and give it a name, for example, ProductNameTM.
-
Set the value for the XML variable. The value is called a variant. As this is an XML variable, include the inline
<superscript>
element. For example:ACME<superscript>TM</superscript> 1000
-
Insert the variable in your topics as needed.
Using XML variables is the only way to have links that change depending on publish settings. Unlike text variables, they allow you to use full XML strings. A link's destination is determined by the URL in the underlying XML, so you can use XML variables to change the link dynamically.
With XML variables, your link label can have the same name, but the destination can change depending on your publishing settings. You can use a different label altogether or disable linking completely in some versions of your documentation. XML variables give you more flexibility than other types of variables.
As an example, if there is a product that has two versions for different markets (one for the US market and one for the European market), the link label can be the same but the link destination can point to different distribution websites. You can also change the link label to something like "US Store" for the US version of the documentation, and "Europe Store" for the European version, with different link destinations for each.
![]() |
This instruction shows how to use different web pages depending on market.
-
Select the Dotted Menu (...) for the Variable sets in Content Manager.
-
Select Create variable set from the menu.
-
Enter a name for the variable set and select the check mark.
-
Expand the Variable sets with the arrow to the left.
-
Select the new variable set.
-
Select Add variable for each variable that is to be inserted in a topic.
-
Name it and select XML to make it a link variable.
-
Select Add variant for each variant to publish to.
-
Copy the XML code below:
<link xlink:href="ZZZ">XXX</link>
-
Replace ZZZ with the URL.
-
Replace XXX with the visible link label.
In the example, we used "Car window" and "Electric motor" as the visible link names. Scroll down to see the result.
Note
To show the URL instead, remove the XXX.
-
Open a topic and insert the created XML link variables.
-
Select Preview in the toolbar to be able to evaluate the result.
-
Select Profile settings.
-
Select the Variables tab.
-
Select the variable set and XML link variable to be used.
-
Select Apply.
Chosen XML link variable will be shown in the topic.
-
Publish the topic to see the visible link name.