Edit online

How to Add Searchable Labels in WebHelp Output

It is possible to add searchable labels in WebHelp Responsive output that can be clicked to search for topics with that exact same label. Labels are textual words attached to a DITA topic that enables it to be easily found using the search function. These labels can help you organize your topics, making it more accessible to retrieve topics for a specific text.

Configure Oxygen Feedback as an External Search Engine

To enable searchable labels, you need to have a search engine that supports this functionality. The Oxygen Feedback search engine implements searchable labels and can be easily configured as a search engine for WebHelp. See Adding Oxygen Feedback to WebHelp Responsive Documentation for more details.
Attention: The default search engine that comes embedded in the WebHelp Responsive output does not support searchable labels. It will simply perform a standard search using the content within the label.

How to Add Searchable Labels in a DITA Topic

The generation of searchable labels in the WebHelp Responsive output is activated by default. You need to insert the desired text (to be displayed in the label in the output) in a <keyword> element with an @outputclass attribute set to label within the prolog of each topic that you want to have that label displayed in the output.
Note: You can right-click anywhere within the topic in Author mode and select Insert > Insert Label to quickly insert the needed structure in the prolog.
For example:
<prolog>
      <metadata>
          <keywords>
              <keyword outputclass="label">Customization</keyword>
          </keywords>
      </metadata>
  </prolog>

This would add a label that contains the text "Customization" in the output for the particular topic. If the user clicks that label, the search engine will search for all topics that have this same label defined.

Transformation Parameters for Generating Searchable Labels

You can have more control over how the labels are generated in the WebHelp Responsive output by using the webhelp.labels.generation.mode transformation parameter. The possible values for this parameter are:
  • keywords-label - Generates labels for each defined <keyword> element that has the @outputclass attribute value set to label.
  • keywords - Generates labels for each defined <keyword> element. If the topic contains <keyword> elements with the @outputclass attribute value set to label, then only these elements will have labels generated for them in the output.
  • disable - Disables the generation of labels in the WebHelp Responsive output.
Note: The default value for the webhelp.labels.generation.mode transformation parameter is keywords-label.

Searchable Labels in WebHelp Responsive Output

The WebHelp Responsive transformation will generate a component that renders the text value of the <keyword> element. When the user clicks that component, they will be redirected to the search page with the search query populated for them and the search engine will display all topics that have the same text value defined in the prolog.