Creating a DITA Content Key Reference

A DITA content key reference, or conkeyref, is a mechanism for inserting a piece of content from one topic into another. It is a version of the DITA content reference mechanism that uses keys to locate the content to reuse rather than direct references to topics that contain reused content.

As with a conref, a conkeyref requires that the element to be reused has an id attribute. It also requires the topic that contains the reusable content to be assigned a key in a map. As with all uses of keys, you can substitute multiple maps or use profiling to create more than one definition of keys in a single map.

This allows you to substitute different pieces of content for the same conkeyref. In other words, the same conkeyref can pull in content from various different sources, depending on how your build is configured. This can make it easier to create and manage sophisticated content reuse scenarios.

To add a content key reference to a topic:

  1. In Author mode, place the caret where you want the reused content to be inserted.
  2. Click the Insert a DITA Content Key Reference button on the DITA toolbar. The Insert Content Key Reference dialog is displayed.
  3. Select the key for the topic that contains the content you want to reuse and press the Subtopic button.
  4. Select the Element ID of the element that you want to insert, and verify the content in the Preview pane.
  5. Make any other selections you need in the Insert Content Reference dialog.
  6. Click Insert and close.