Gretyl's Portal

Heretto Help

Context Maps

A context map is a map that contains resources, such as keys, which help resolve references. When you set a map as a context map, references in documents are resolved based on the keys in the map. So, different maps can resolve references differently based on the keys defined. When there is no context map selected, your key references will not resolve and no content displays.

Let's look at an example of how setting a context map resolves content key references (conkeyrefs). In the following example, the conkeyref vars/productName shows, but the content being referenced does not. This is because only maps contain key names and definitions, so when a context map is not selected, the conkeyref is not referencing any content.

However, once you set a context map, the keys and key references defined in the map are used to resolve the conkeyrefs. For example, selecting m_classic_toaster_user_guide.ditamap as the context map shows the vars/productNamee key as the Classic Toaster.

If you change the context map, and the keys and key references use the same ID but link to different content, the keys are maintained but the content being referenced changes. For example, selecting _m_lightning_toaster_user_guide.ditamap as the context map shows the vars/productName key as the Lightning Toaster.

Example of a context map

Below is the content of the context map used in this example. You can see that the vars/productName is defined as Classic Toaster

Figure 1. Example of a context map
Example of a context map

.

Apply a Context Map

Apply a context map and use the selected map's key names, key definitions, variable warehouse topics, and warehouse topics to resolve dependencies such as key references (keyrefs) and content key references (conkeyrefs).

  1. Open a map or a topic and from the Context drop-down menu, select Select a context map.
    Figure 2. Context Menu for a topic
    Context Menu for a topic
    Figure 3. Context Menu for a map
    Context Menu for a map
    Note:

    For maps, the default context map is the current map so the map to you are currently editing. For topics, no context map is set by default.

  2. Navigate to and select a map.
  3. Click Select.
The selected context map is used to resolve references when previewing or editing files. For example, if you have variables (conkeyrefs), glossary terms (via keyref), or keyref links in a topic or map that you're previewing or editing, the references will resolve to show the correct content.