SharePoint 2013 – Hover Panel Display Templates not showing Custom Columns

Custom hover panels

Today I created a custom hover panel. I took the default item_Default_HoverPanel.html from my Display Templates Gallery and added a copy as item_custom_hoverpanel to the Display Template Gallery.

I also did the same for item_default.html as there is a reference to the hover panel used in there.

The I added some extra fields to the following line:

<mso:ManagedPropertyMapping msdt:dt=string">'Title':'Title,.... </mso:ManagedPropertyMapping>

But whatever I did my properties would not appear. In the above line I added the propery:

<mso:ManagedPropertyMapping msdt:dt=string">'MyCustomManagedProperty':'MyCustomManagedProperty','Title':'Title,.... </mso:ManagedPropertyMapping>

I created a Managed property and checked the properties many times. I ran a full search crawl , still no luck.

I even added the property to a Refinement panel aha it appears in the refinement panel. So this is the proof that the managed property works.

 

Your solution

I added the same custom property to my item_custom.html

<mso:ManagedPropertyMapping msdt:dt=string">'MyCustomManagedProperty':'MyCustomManagedProperty','Title':'Title,.... </mso:ManagedPropertyMapping>

And now my hover panel suddenly shows my properties. Why??

The item_custom/item_default.html builds up the ctx object and this is not updated by hover panels. Therefore cts.CurrentItem isn’t changed when my hover panel uses additional Managed properties.

 

 


Discover more from SharePains

Subscribe to get the latest posts sent to your email.

Avatar of Pieter Veenstra

Is your business still running on paper trails, sprawling Excel files, or ageing Access databases? There's a better way — and I can show you exactly what it looks like. I'm the Technical Director of Vantage 365, a Microsoft solutions consultancy working with clients across the UK, the Netherlands, and worldwide. For over 30 years I've been turning messy, manual business processes into clean, automated systems that save time, reduce errors, and give teams the visibility they need to make better decisions. You can contact me using contact@sharepains.com

Related Posts

One thought on “SharePoint 2013 – Hover Panel Display Templates not showing Custom Columns

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Discover more from SharePains

Subscribe now to keep reading and get access to the full archive.

Continue reading