This is the third post in a series I will be writing on the Content by Search Web Part (aka CSWP):
- What you get in the box
- Going Old Skool with XSLT (this post)
- Packaging & Deployment in Visual Studio
Now I am admittedly going to cop out here. I was originally intending to write this up in detail but to be honest it has already been done (very well) before.
So I would invite you to read the most excellent blog post from Waldek Mastykarz (@waldekm):
Using server-side rendering with Content Search Web Part in SharePoint 2013
He not only shows you how to hook up your JS Display Template with a server-side XSL file, but also shows you how to deploy the files and its primary usage (as a Search Crawler output).
If you want to use this method for all of your web requests then you can set theAlwaysRenderOnServer property of the CSWP to “true” and it will always use your XSL template file.
Next in the series: Packaging & Deployment in Visual Studio
By Martin Hatch, Associate Principal SharePoint Consultant