Insert a key reference (keyref) in a topic

You can insert text as a variable into a topic. This variable is more commonly known as a key reference or <keyref>.

Before you begin

To add a key, you must check out the topic and select a context map for the topic. The key for insertion must be defined in the context map or a submap of the context map.

About this task

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

To insert a key in a topic:

Procedure

  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 dropdown list of possible valid elements for the current cursor location.
  6. Click Insert.

Results

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