Variable Reuse with Conkeyrefs
You reuse variables from variable warehouse topics with conkeyref attributes.
Overview
- The “Variables Warehouse” topic is added to the deliverable “Map A” through the keydef element with the
@keys
attribute assigned.Important: Including variable warehouse topics through the keydef element with the@keys
attribute assigned is necessary for the variable reuse mechanism to operate properly. By default, keydef elements are not included in the output. - “Variable A” is used in “Element A” in “Topic A”.
- “Variable B” is used in “Element A” and in “Element D”. The elements are in different topics.
Example
The following examples show the variable reuse mechanism through conkeyref attributes in Heretto CCMS. The Content Editor indicates reused variables with gray background.
The following example shows a map that includes “Topic A”, “Topic B” and “Warehouse Topic”. The warehouse topic contains variables.
<map id="ditamap-7326" title="Map A">
<topicref href="topic_a.dita"/>
<topicref href="topic_b.dita"/>
<keydef href="warehouse_topic.dita" keys="vars"/>
</map>
The following example shows a warehouse topic that includes two variables.
The following example shows a topic that references two variables from the variable warehouse topic.
The following example shows a topic that references one variable from the variable warehouse topic.