Table of Contents
User Guide
Content Key References
Content Key References
Content key references (conkeyrefs) are a method of reusing content by referencing content through keys. Conkeyrefs are frequently used for variables, or content that might change.
Setting Variable Content in a Warehouse Topic
Use warehouse topics to contain variables such as product, company, or interface names.
Adding a Warehouse Topic to a Map
Add a warehouse topic to a map as a keydef so you can resolve content key references in topics.
Inserting a Conkeyref into a Topic
Reuse variable content in a topic.
Content Key References

Content key references (conkeyrefs) are a method of reusing content by referencing content through keys. Conkeyrefs are frequently used for variables, or content that might change.
section
Variables make it easy to reuse content and update information globally. Use variables for information such as product names, company names, product-specific information, and even user interface elements. When you use variables, you’re not actually inserting the text that’s displayed, but creating a conkeyref to that variable’s ID. By using content key references, you can abstractly reference the content without specifying the element. For more information, see Key References.
Variables can be used for contextual changes. For example, if you have a topic that is used for two different products, you can reuse that topic and just change the product name by using a variable.
You can also use variables for information that might change regardless of whether it’s reused in different maps. For example, if your company is rebranding a product, you should make the product name a variable. Then, when the rebranding takes place, you can just update the product name in one place and that update will reflect everywhere the variable is used.
Variables are typically organized into one or more warehouse topics. Having all your variables in one location, like a warehouse topic, makes it easier to track, manage, and maintain your content.
To use conkeyrefs, you need to do the following:
  1. Insert a conkeyref in a topic to reuse the variable content. For more information, see Inserting a Conkeyref into a Topicf5e3ba86-d8ce-4197-b0bf-ef6a8fca50cf:comment:adminf5e3ba86-d8ce-4197-b0bf-ef6a8fca50cf.
section

Conkeyref Example

You need to publish a manual for both the Toaster 1000 and Toaster 1500. Both publication maps reuse the same Setting up the Toaster topic because the set up documentation for each model is the same. But what if you want to mention the specific toaster model? You can create variables for the names of each toaster model that you create conkeyrefs to. For example, we use the following key name and ID combination to resolve the product name vars/productName:
When the Setting up the Toaster topic is in the Toaster 1000 publication map, then the conkeyref to vars/productName resolves to the Toaster 1000 product name. For example:
When the Setting up the Toaster topic is in the Toaster 1500 publication map, then the conkeyref to vars/productName resolves to the Toaster 1500 product name. For example:
Each of these publication maps contain their own warehouse topics with variables specific to the product model. So if there are any topics reused among different product models, using conkeyrefs eliminates the need for duplicate topics.
Setting Variable Content in a Warehouse Topic

Use warehouse topics to contain variables such as product, company, or interface names.
context
Use an empty base topic to create variable text for reuse. This variable text must be contained within the phrase element to be reusable.
  1. In the Topic Editor , open an empty Default Topic.
  2. Click Table -> Insert Table and insert a table with two columns, which will hold your variables.

    Step Information
    Expected Result
    A table is inserted in the topic.
  3. Right-click the table and select Table -> Insert Table Header , then label the first column Variable and the second column ID

    Step Information
    Expected Result
    A table header is added.
  4. Place your cursor in a cell in the Variable column and click Insert -> Phrase .

    Expected Result
    The Phrase element is inserted.
  5. In the Phrase element, enter the variable text.

    Example
    For example, enter -[[easyDITA]]-+[[Classic Toaster]]+.
  6. Right-click the variable that you created and select Make Reusable (set ID) -> Phrase .

    Step Information
    Expected Result
    The Set id dialog displays.
  7. In the Set id dialog, enter a unique ID for the variable. Choose an ID that relates to the variable because it’s used to identify the element for reuse.

    Example
  8. Click Set .
  9. In the ID column, enter the ID you set for the variable.

    Example
result

You created variable content and assigned an ID to it so it can be reused.

postreq
Next, add this warehouse topic to the map(s) you want to use the variables in.
Adding a Warehouse Topic to a Map

Add a warehouse topic to a map as a keydef so you can resolve content key references in topics.

Adding a topic as a keydef identifies the warehouse topic a resource-only file that’s used to resolve key references. Keydefs are not published.

prereq
You have a warehouse topic with some variable text in it.
  1. Open a map in the Map Editor .

    Expected Result
    The map displays in the Map Editor Pane.
  2. Drag and drop a warehouse topic from the Content Library into the Map Editor Pane.

    Expected Result
    The Insert dialog displays.
  3. Select Keydef from the drop-down menu.

    Expected Result
    The Keys field displays.
  4. Enter a Key name.

    Example
    For example, enter vars, which is short for variables.
  5. Click Save to save changes made to the map.  

    Expected Result
    The Keydef element is inserted. A key icon and the key name display next to the warehouse topic.
result

You added the warehouse topic to a map as a keydef element.

postreq
Now, you’re ready to insert a conkeyref to a variable in your warehouse topic.
Inserting a Conkeyref into a Topic

Reuse variable content in a topic.
prereq
You added a warehouse topic as a keydef in a map.
Remember:When using keys, you must have a map open or map context set in order to see available keys and for keyrefs to resolve.
  1. In the Topic Editor , open a topic in which you want to insert a conkeyref to a variable in a warehouse topic.
  2. Place your cursor where you want to insert a conkeyref.
  3. Click Re-use Content -> Insert Conkeyref .

    Expected Result
    The Conkeyref drop-down menu displays.
  4. Enter or select the conkeyref name from the Conkeyref drop-down menu.

    Expected Result
    The conkeyref is inserted.
result

A conkeyref is inserted.