"The day you stop learning SharePoint is the day you stop using it."

Customizing Refinement Panel

To customize Refinement Panel you need to edit the xml file stored in Filter Category Definition. Before performing the above steps make sure that you have created a new Managed Property in Metadata Properties (to the left panel) of Search Administration and mapped to the crawled property.










Perform a Full Crawl and then perform the below given steps.

1. Right click the Refinement Panel web part and select Edit Web Part.
2. Click on Refinement Option and uncheck ‘Use Default Configuration’ check box. 
3. Select Filter Category Definition box in Refinement Option to open the text editor.
4. Copy the entire contents of the text editor and save into a Notepad as an XML file.
5. Open the XML file in Visual Studio and add the following tag in the file.

<Category Title="Your Filter Category Name"   
Description="This category is about….."    Type="Microsoft.Office.Server.Search.WebControls.ManagedPropertyFilterGenerator”
MetadataThreshold="5"   
NumberOfFiltersToDisplay="4"   
MaxNumberOfFilters="20"   
SortBy="Frequency"   
SortByForMoreFilters="Name"   
SortDirection="Descending"   
SortDirectionForMoreFilters="Ascending"   
ShowMoreLink="True"   
MappedProperty="MappedPropertyName"   
MoreLinkText="show more"   
LessLinkText="show fewer"/>


6. Save the file.
7. Copy the entire content of the saved XML file and replace with the original file in the File Category Definition.
8. Click on Apply button and then click on OK button.

      Below image is an example of custom filter category added in Refinement Panel XML file.


Share:

0 comments:

SharePoint-StackExchange Moderator

Author's Profile

My photo
India
A SharePoint Enthusiast working as a Lead Solution Architect for an IT Software & Consulting Company in Mumbai. I believe in giving back to the community through which I also learn and develop and eventually grow as an individual and professional. This blog is a small contribution to the community where I live in and may help someone who is seeking knowledge like me.

Popular Posts

Powered by Blogger.

Contact Form

Name

Email *

Message *

Total Pageviews