Monday, 8 September 2014

SharePoint Custom Refinement

Create sharepoint search site (Or, create a page and add search web parts. In that add search refiner web part also)
Now edit page.
Click on refiner webpart
Edit web part
Click on "Choose Refiners..."
In the new window, from available refiners..i have selected owsmetadatafacetinfo"
Scroll down..you will see "Display template"
From that dropdown, you have to select custom display template.
So first you need to create new display template..
Create a html file.

Copy below code...
Save
Upload above file..
Site Settings-->Master pages and page layouts -->Display Templates -->Filters

Now you will see new js also, which has created automaticaly

Now go back to refiners webpart, refresh. you will see "My Custom Refinement"
Select this..
Save..