Category: SharePoint 2013


If you created your own display templates, you most probably have used the AddPostRenderCallback function. The AddPostRenderCallback function allows you to execute code once the display template completed rendering and this function can be used in every template (control, item, …). Now when you are creating your own refiner display templates and want to do something once all the refiners are rendered, the first approach would be to create a AddPostRenderCallback function in the refinement control template.


This article explains a quick tip how you can allow empty search queries. This functionality is necessary when you have pages on which you configured the search web parts to use predefined queries in order to show results when the page gets loaded. Note: This could be either configured in the web part itself or via a result source.


If you are using content by search web part (CSWP), it might sometimes happen that no results are retrieved for a particular query. When this happens, the CSWP will by default not render any mark-up, but you can also configure the web part to show a message when no results are retrieved.


The search result web part and content by search web part share the same item result limit of a maximum of 50 items that can be shown. If you want to show more items, the only option you have out-of-the-box is using a control template that allows paging (like List with paging for the CSWP).


In various SharePoint environments I see that clients mostly use the predefined refiners that you get from an out of the box search center. These refiners could of course help your users to find the right results, but they can always be made better. The author refiner for example can simply be more useful by adding the user his or her profile picture next to their name.


For a client, my colleague and I were creating a new “who is who” functionality on their intranet via a couple search web parts. In order to show the full profile of a user we created a new page with a content by search web part that showed a single user result.