# Context-Specific Help Content

The ditamap requires specific markup to implement context-sensitive help.

Each `<topicmeta>` element that wraps a `<resourceid>` element may optionally contain one `<searchtitle>` element or one `<shortdesc>` element, or both (one of each):

- The `<searchtitle>` element is used to supply the value of the title attribute on the `<context>` element in the Eclipse context XML file.
- The `<shortdesc>` element is used to supply the content of the `<description>` element in the Eclipse context XML file. For example:

          <topicref navtitle="label attribute in contexts.xml topic element"
              href="path/to/topic.xml">
              <topicmeta>
                  <searchtitle>Optional text to override the help About title.</searchtitle>
                  <shortdesc>Text for context description.</shortdesc>
                  <resourceid id="help_context_ID_string"/>
              </topicmeta>
          </topicref>

Note: The `<searchtitle>`, `<shortdesc>`, and `<resourceid>` elements must appear in the `<topicmeta>` element in the order shown above.
A DITA map that contains the example shown above produces the following content in an Eclipse context XML file:

        <contexts>
            ...
            <context id="help_context_ID_string"
                title="Optional text to override the help About title.">
                <description>Text for context description.</description>
                <topic label="label attribute in contexts.xml topic element"
                    href="PLUGINS_ROOT/doc_plugin_ID/path/to/topic.xml"/>
            </context>
            ...
        </contexts>

where doc_plugin_ID is the value of the id attribute on the `<map>` element.

The following illustration shows how the `<searchtitle>` and `<shortdesc>` elements in a DITA map can be transformed into markup in the Eclipse context XML file, and how those items in the context XML file provide the context-specific content rendered in the Help view.

Parent topic: Context-Sensitive Help Plug-ins with DITA