So for every Search project I work on this requirement
always surfaces, which is why I am confused to why Microsoft did not default
the refiners to include the totals.
Including totals in your refiners is actually very easy and only
requires a small modification to your Search Filter refiner. Depending on whether you are utilizing a
single option refiner or the multi value refiner will determine which filter
refiner you will need to update.
Single Selection
Filter_Default
Multiple Selections
Filter_MultiValue
Filter_Default
Multiple Selections
Filter_MultiValue
The first step to modifying the refiner(s) is to locate them
How to Locate Your
Filter Files:
(Note: We do not want to modify the JS Files, any updates we make to the HTML files will propagate to the linked JS files.)
(Note: We do not want to modify the JS Files, any updates we make to the HTML files will propagate to the linked JS files.)
- Site Settings
- Master pages and page layouts
- Display Templates
- Filters
- Save a copy of either the Filter_Default.html and/or Filter_MultiValue.html files to your desktop
How to Modify Your
Filter Display Templates
Now that we have saved copies of the filter display templates, it is time to edit them in order to display totals.
Now that we have saved copies of the filter display templates, it is time to edit them in order to display totals.
- Open the files in a text editor i.e. Notepad++, Notepad, SharePoint Designer, Visual Studio, etc
- Modify ShowCounts: to equal true
Original
<!--#_ this.Options = { ShowClientPeoplePicker: false, ShowCounts: false };
<!--#_ this.Options = { ShowClientPeoplePicker: false, ShowCounts: true };
No comments:
Post a Comment