Thursday 16 October 2014

Using Javascript and the ctx element within Display Templates

So as you know I love Display Templates, using in the Content Search web part.

I just found this awesome article, showing how to do some fantastic "Higher Grade" stuff with Display Templates.

When working with Display Templates you use a combination of HTML and JavaScript/JQuery to manipulate it into doing what you want it to do. The below link, shows some nice tricks, on working with the ctx elements and the Managed Property Mapping.

Check it out:
Useful JavaScript to know when working with SharePoint Display Templates (#SPC3000)
http://www.dotnetmafia.com/blogs/dotnettipoftheday/archive/2014/02/26/useful-javascript-for-working-with-sharepoint-display-templates-spc3000-spc14.aspx

1 comment:

  1. Excellent! Thanks for this - I’ve been looking at this feature for ages. Followed your instructions and it works a treat!

    ReplyDelete