Insert a key in a topic

You can insert an element as a variable into a topic as a key, also known as a key reference or <keyref>.

To add a key, you must check out the topic and select a context map for the topic.

Also, the key you want to insert must be defined in the context map or a submap of the context map.

One way to leverage a key is to insert a reference to the key in a topic.

To insert a key in a topic:

  1. In Topic Editor, select the location in the topic where you want to add the key.
  2. On the toolbar, click Insert links and variables defined as keys.
    The Insert DITA key dialog opens.
  3. To narrow the list, select the type of key you want to insert.
    • All
    • Web link for key definitions that reference URLs
    • Keywordfor key definitions that reference words or phrases
    • Object for key definitions that reference other DITA objects
  4. In the Key field, select the key you want to insert.

    The name of the key appears in square brackets, followed by the key value.

  5. In the Element field, select an element from the drop-down list of possible valid elements for the current cursor location.
  6. Click Insert.

The key is inserted at the selected location using the selected element, marked as such by a shaded background and a clickable link icon.