SharePoint 2013 Display TemplatesGP0|#a362bcc2-2314-4427-ae33-7a45e5012e3c;L0|#0a362bcc2-2314-4427-ae33-7a45e5012e3c|Display Template;GTSet|#68e31ecf-dbe9-45e0-8a3c-fc6bd6ad0ce6;GPP|#0b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a;GPP|#a5205c2f-ad79-446f-8d9e-afd0eeecf427;GPP|#74f9ea2a-fcec-489f-9ca4-da563b559213;GP0|#567da76c-2e72-4db7-9f49-824ae611e7ec;L0|#0567da76c-2e72-4db7-9f49-824ae611e7ec|Web Content Management
Add Presence to SharePoint Search ResultsGP0|#a362bcc2-2314-4427-ae33-7a45e5012e3c;L0|#0a362bcc2-2314-4427-ae33-7a45e5012e3c|Display Template;GTSet|#68e31ecf-dbe9-45e0-8a3c-fc6bd6ad0ce6;GPP|#0b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a;GPP|#a5205c2f-ad79-446f-8d9e-afd0eeecf427;GPP|#74f9ea2a-fcec-489f-9ca4-da563b559213;GP0|#0b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a;L0|#00b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a|Search ​How to add presence information to a search display template assuming you have a valid SIP address in the item to be displayed (usually an email address).
Running Client Script in a Display Template After Rendering is Complete in SharePoint 2013GP0|#a362bcc2-2314-4427-ae33-7a45e5012e3c;L0|#0a362bcc2-2314-4427-ae33-7a45e5012e3c|Display Template;GTSet|#68e31ecf-dbe9-45e0-8a3c-fc6bd6ad0ce6;GPP|#0b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a;GPP|#a5205c2f-ad79-446f-8d9e-afd0eeecf427;GPP|#74f9ea2a-fcec-489f-9ca4-da563b559213 ​How to run javascript in a display template after the template has finished rendering
Extending the SP2013/Office 365 search hover panel (e.g. adding “post to my feed” functionality)GP0|#65c849ad-5898-4c97-bd5e-0247fcdb2576;L0|#065c849ad-5898-4c97-bd5e-0247fcdb2576|Search Core Results;GTSet|#68e31ecf-dbe9-45e0-8a3c-fc6bd6ad0ce6;GPP|#1bc09cbd-f411-45d5-ad40-bb6b715fb72f;GPP|#a5205c2f-ad79-446f-8d9e-afd0eeecf427;GPP|#74f9ea2a-fcec-489f-9ca4-da563b559213;GP0|#a362bcc2-2314-4427-ae33-7a45e5012e3c;L0|#0a362bcc2-2314-4427-ae33-7a45e5012e3c|Display Template;GPP|#0b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a ​The enhanced search experience is one of the great things about SharePoint 2013, and the “hover panel”, which shows more information about the result when you hover over it, is a key part of that. Being able to peek inside a document or presentation, or see a preview of a web page without clicking on the result makes for way more efficient searching. Just like search results themselves, the appearance and functionality of the hover panel can be easily extended with HTML, CSS and JavaScript – in this post I am providing some sample code I’ve used in conference talks, which I think highlights things in this area quite well. My sample could be used as-is or modified to provide some other customization to the hover panel.
Managed properties in Display Templates not workingGP0|#a362bcc2-2314-4427-ae33-7a45e5012e3c;L0|#0a362bcc2-2314-4427-ae33-7a45e5012e3c|Display Template;GTSet|#68e31ecf-dbe9-45e0-8a3c-fc6bd6ad0ce6;GPP|#0b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a;GPP|#a5205c2f-ad79-446f-8d9e-afd0eeecf427;GPP|#74f9ea2a-fcec-489f-9ca4-da563b559213 ​If you add a custom managed property into a custom display template, the ct.CurrentItem.[YourManagedPropertyName] is always undefined when using Result Types. Changing the web part to use a single template to display results works. This discussion thread has several workarounds and links to good resources.
Running Client Script in a Display Template After Rendering is CompleteGP0|#a362bcc2-2314-4427-ae33-7a45e5012e3c;L0|#0a362bcc2-2314-4427-ae33-7a45e5012e3c|Display Template;GTSet|#68e31ecf-dbe9-45e0-8a3c-fc6bd6ad0ce6;GPP|#0b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a;GPP|#a5205c2f-ad79-446f-8d9e-afd0eeecf427;GPP|#74f9ea2a-fcec-489f-9ca4-da563b559213 ​To invoke your own function after the template renders, you need to add this the javascript section of your display template
Add ratings to search resultsGP0|#a362bcc2-2314-4427-ae33-7a45e5012e3c;L0|#0a362bcc2-2314-4427-ae33-7a45e5012e3c|Display Template;GTSet|#68e31ecf-dbe9-45e0-8a3c-fc6bd6ad0ce6;GPP|#0b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a;GPP|#a5205c2f-ad79-446f-8d9e-afd0eeecf427;GPP|#74f9ea2a-fcec-489f-9ca4-da563b559213
Display template reference in SharePoint Server 2013GP0|#a362bcc2-2314-4427-ae33-7a45e5012e3c;L0|#0a362bcc2-2314-4427-ae33-7a45e5012e3c|Display Template;GTSet|#68e31ecf-dbe9-45e0-8a3c-fc6bd6ad0ce6;GPP|#0b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a;GPP|#a5205c2f-ad79-446f-8d9e-afd0eeecf427;GPP|#74f9ea2a-fcec-489f-9ca4-da563b559213 ​You can use the following display templates to change the appearance of content that is shown in a Content Search Web Part. These display template files are located in the Content Web Parts subfolder in the Display Templates folder in the Master Page Gallery.
Create JSLink override for Site Collection ColumnGP0|#a362bcc2-2314-4427-ae33-7a45e5012e3c;L0|#0a362bcc2-2314-4427-ae33-7a45e5012e3c|Display Template;GTSet|#68e31ecf-dbe9-45e0-8a3c-fc6bd6ad0ce6;GPP|#0b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a;GPP|#a5205c2f-ad79-446f-8d9e-afd0eeecf427;GPP|#74f9ea2a-fcec-489f-9ca4-da563b559213 ​A Display Template can be attached to a Site Column so the custom rendering in new/edit/display form will always be applied when that column is used
Useful JavaScript to know when working with SharePoint Display TemplatesGP0|#a362bcc2-2314-4427-ae33-7a45e5012e3c;L0|#0a362bcc2-2314-4427-ae33-7a45e5012e3c|Display Template;GTSet|#68e31ecf-dbe9-45e0-8a3c-fc6bd6ad0ce6;GPP|#0b83bd4b-e1d8-4db2-b273-ee9f3f2efb1a;GPP|#a5205c2f-ad79-446f-8d9e-afd0eeecf427;GPP|#74f9ea2a-fcec-489f-9ca4-da563b559213 ​With the display templates feature in SharePoint 2013, you can highly customize the look of search using HTML, JavaScript, and jQuery. It turns out there are a lot of helper functions to make your life easier in the out-of-the-box scripts.