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.
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 insert it as a conkeyref 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.

Conrefs are used for variable text like company or product names. A content key reference is a reference to variable content via a key reference. By using key references, you can abstractly reference the content without specifying the element. For more information, see Key References.

section
These 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. Create a warehouse file to hold your variable content. For more information, see Setting Variable Content in a Warehouse Topic.
  2. Add the warehouse file as a keydef in your map. For more information, see Adding a Warehouse Topic to a Map.
  3. Insert a conkeyref in a topic to reuse the variable content. For more information, see Inserting a Conkeyref into a Topic.
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 make the toaster models variables that you create conkeyrefs to. For example, we use the following key name and Id combination to resolve the product name varsProperNouns/productName:
When the Setting up the Toaster topic is in the Toaster 1000 publication map, then the conkeyref to varsProperNouns/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 varsProperNouns/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 several 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.

Use an empty basic topic to create variable text for reuse. This variable text must be contained within the phrase < ph> element to be reusable.

  1. In the Topic Editor, open an empty basic topic.
  2. Click Insert -> Phrase.

    Expected Result
    The Phrase element is inserted.

  3. In the Phrase element, enter the variable text.

    Example
    Enter easyDITA.

  4. Right-click the variable that you created.

    Expected Result
    The context menu displays.

  5. Select Make Reusable (set ID) -> Phrase.

    Step Information

  6. In the Id field, 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

  7. Click Set .
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. For more information, see Adding a Warehouse Topic to a Map.

Adding a Warehouse Topic to a Map

Add a warehouse topic to a map as a keydef so you can insert it as a conkeyref 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. For more information, see Setting Variable Content in a Warehouse Topic.

  1. Open a map in the Map Editor.
  2. Drag and drop a warehouse topic from the Content Library into the Map Editor Pane.

    Expected Result
    The drop-down menu displays.

  3. Select Keydef .

    Expected Result
    The Keys field displays.

  4. Enter a Key name.

    Example
    Enter vars.

  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 as a keydef element in a map.

postreq
Now, you’re ready to insert a conkeyref to a variable in your warehouse topic. For more information, see Inserting a Conkeyref into a 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. For more information, see Adding a Warehouse Topic to 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.