There may be times where you want to edit a regular topic and add information that is stored in a publication topic. For example, you may want to add the copyright year and holder to a topic.
One way to do this is to use a dynamic variable. This is a reference to another element.
-
Edit your regular topic.
-
Use the keyboard shortcut to add a dynamic variable.
The keyboard shortcut is:
-
Windows: Ctrl + Alt + Shift + I
-
Mac: Control ^ + Option ⌥ + Shift ⇧ + I
Alternatively, you can add a phrase element and give it the role attribute with a value of
dyntextvar
For more details, see Insert a Dynamic Text Variable.
-
-
Enter the reference in the dynamic text variable. For a reference to the publication topic, use this syntax:
${//d:article/d:info/d:<element>/d:<child element>}$
This structure applies for referencing the various info elements in a publication topic.
-
d:article references the article element in the publication topic
-
d:info references the info element inside it
-
d:<element> references an info element, for example, d:pubdate
-
d:<child element> references a child element of the previous element, for example, d:copyright/d:year is a reference to the year element that is a child of the copyright element.
For example:
${//d:article/d:info/d:copyright/d:year}$
You can add text as well, for example, a common use of dynamic variables is to include the copyright information. That could be a dynamic variable with text at the start and then the reference to the copyright year and copyright holder elements.
Copyright © ${//d:article/d:info/d:copyright/d:year}$ ${//d:article/d:info/d:copyright/d:holder}$
-
-
Select Save.
When you publish the publication, Paligo will find the referenced elements and insert the values from those into the dynamic variables.
Comments
0 comments
Article is closed for comments.