Posted on:
Categories: SharePoint

Reuse of XSL in SharePoint 2013

After the big push towards search-based rollup web parts in SharePoint 2013 (namely, the Content Search web part) and their associated display templates, there hasn't been a lot of noise regarding how "old fashioned" Content Queries work with regards to styling.

It turns out, SharePoint 2013 Content Query web parts are nearly identical to SharePoint 2010. This means, among other things, it still uses XSL to format and display information retrieved by the query. Initially I was dissapointed to learn that I could not use my newly designed display templates with content queries, but then I realized this could be a huge benefit to clients with many custom styles upgrading from SharePoint 2010. This means that instead of writing many new html/javascript-based display templates to replace their original XSL, we can simply transplant their 2010 XSL styles directly in to 2013, with little or no changes.

Identical Web Part Settings

As you can see above, apart from the global 2013 branding changes, the web part settings are identical. In particular, take a look at the Styles section - it's the same! So not only can you use your 2010 XSL styles, but you can carry over all your web part settings. Although we cannot take advantage of the cross-site data retrieval that the Content Search web part brings to the table, you can bring forward all (or most, let me know if there are differences I haven't noticed yet) your carefully designed content query web parts directly into 2013 from 2010 with minimal changes.