Skip to main content

Reference an Info Element in a Regular Topic

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.

  1. Edit your regular topic.

    Note

    The topic needs to be part of at least one publication. When you publish, Paligo will take the information from the publication's topic and insert it into the dynamic variable.

  2. 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.

  3. 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}$

    Note

    The information from the publication topic does not appear when you view a topic in the Paligo editor. It is added when the topic is processed during publishing.

  4. Select Save. Save icon.

When you publish the publication, Paligo will find the referenced elements and insert the values from those into the dynamic variables.