Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

Optional: Implementing the Search gadget

Updated on April 28, 2021

Add the Search gadget in your application to search for and then display the contents of a selected article from the search results. The Search gadget supports searching on tags and filtering by categories.

Pega Knowledge Implementation Guide Pega Knowledge Implementation Guide Pega Knowledge Implementation Guide Pega Knowledge Implementation Guide
Note: This gadget is intended for use in custom platform applications (for example, non-customer service or non-Sales Automation applications).

This section contains the following topics:

  • Adding the Search gadget in your application
  • Optional: Opening the article in a new window
  • Applying custom styles to the Search gadget

Adding the Search gadget in your application

You can add the Search gadget anywhere in your application by adding the KMArticleSearchGadget section in the section where you want the gadget to appear.

  1. Open the section in which you want the gadget to appear, for example, pyCaseMainInner.
  2. In the target section, add the KMArticleSearchGadget section, as in the following example:
  3. Make the section editable. When the section is editable, users can enter text in the text boxes and select from the drop-down lists in the gadget.
    1. Hover over the section, and then click the Edit icon.
    2. In the Cell Properties window, click the Presentation tab.
    3. In the Edit option list, select Editable.

Optional: Opening the article in a new window

By default, when you click an article from the search results list, the article opens on the right side of the Search gadget (see the example at the end of this topic). Optionally, you can configure the gadget to open the article in a new window.

  1. Open the KMArticleSearchGadget section.
  2. In the table in the lower left under the Dynamic Layout section, click the ArticleTitle link.
  3. In the Cell Properties window, click the Actions tab.
    The OpenArticleInGadget activity creates the ArticleGadgetPage page by using the clicked articles in pzInsKey. You can use ArticleGadgetPage as a context page and launch a harness with the ContentViewInArticleGadget section embedded in it.
For example: Search results showing the contents of the selected article on the right side of the pane.

Applying custom styles to the Search gadget

You can add custom styles using the CSS class in the style sheet to achieve the intended effect. The process is similar to the process for adding custom styles to other user interface elements.

To apply custom styles to the Search gadget, add a style sheet to the skin of the application:
  1. In the header of Dev Studio, click Application > Skin.
  2. On the Included styles tab, click Additional style sheets.
  3. Add your custom style sheet by clicking Add style sheet as shown in the following example:
  • Previous topic Configuring Pega Mashup for launching service cases
  • Next topic Optional: Implementing the Add Suggested Article gadget

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us