Customize the Refinement Panel

The Refinement Panel, shown in Figure 8.9, is part of the search results page of search centers by default, but because it is a web part, it can be added to any results page in your SharePoint 2010 site. Moreover, a Refinement Panel can also be customized to your needs; it is a useful and powerful tool for filtering the result set.

Figure 8.9. Viewing the out-of-the-box Refinement Panel.

image

To customize the Refinement Panel, perform the following steps:

  1. Open the search results page for editing.
  2. Open the context menu of the Refinement Panel, and choose the action Edit Web Part.
  3. Expand the setting group Refinement, and open the Filter Category Definition field, as shown in Figure 8.10, by clicking on the small button labeled ‘...’.

    Figure 8.10. Viewing a Filter Category Definition of the Refinement Panel.

    image

  4. To edit this XML description, it is useful to open an XML editor and copy the XML code there directly.
  5. You can find the filter field descriptions in the CustomFilters tag. For example, you can find CustomFilter tags for Email, Excel, Image, PowerPoint, Visio, Webpage, Word, and so on.
  6. To add new values to a custom filter, you have to add new OriginalValue tags for each value. For example, the custom filter “PowerPoint” does not contain the extensions pps and ppsx. To add them, insert new OriginalValue tags, as shown in the following code snippet:

    image

  7. You can also add new filter fields, by adding new CustomFilter tags to the CustomFilters in the Result Type category.
  8. In addition, it is possible to remove any of the filters by deleting its CustomFilter tag from the XML Description.
  9. After finishing all modifications desired, copy the XML back to the Refinement Panel web part’s editor, click OK, and save the changes.
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset