ballardchalmers - home

Contact us 01342 410223

Blog

Customising the Content Search Web (Part 3): Going Old Skool with XSLT

This is the third post in a series I will be writing on the Content by Search Web Part (aka CSWP):

  1. What you get in the box
  2. Custom Display Templates with JavaScript
  3. Going Old Skool with XSLT (this post)
  4. 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
www.martinhatch.com

Comment on this article

About

Ballard Chalmers is one of the UK’s leading enterprise software engineering companies, specialising in development for the Microsoft Enterprise Application Platform. We are principally dedicated to software development and integration for the Microsoft Cloud, as well as on-premises and hybrid systems. Our expertise is in Microsoft .NET, SQL Server, BizTalk Server and SharePoint Server.

Let's talk

  01342 410223

Find out more

Thank you for contacting us.

We will be in touch with you shortly.