0

I have customized the Item_PDF Display template. I would like the hover panel that is displayed to be based on the Item_Person_Hover panel. The goal is to present expertise information about the author of the document presented in Item_PDF.

I have changed the reference in Item_PDF to the Hover Panel as follows:

var hoverUrl = "~sitecollection/_catalogs/masterpage/Display Templates/Search/Item_Person_HoverPanel.js";

I've published the custom Item_PDF html and a js is created, yet the hover panel that appears continues to be the Item_PDF_HoverPanel despite the change to the reference line above.

I don't expect the hover panel to work initally, as I need to figure what data needs to be passed to it from the standard PDF template, but I thought at the very least it would appear blank or cause an error.

thanks!

  • 1
    go to your webpart on a page and in the display template section, select your PDF template – Gautam Sheth Aug 10 '18 at 13:23
  • I was using a Result Type. When I switched to select the Display Template there are two with the same name. I selected each one and one of them works perfectly. You should answer and I will mark as answered. Thanks very much! – Martin Muldoon Aug 10 '18 at 13:31
1

As mentioned in comments, you are currently using a Result type.

Instead of that, switch to Use a single template to display items and select your display template.

If its custom, select that or if you have modified the OOTB template then select PDF Item display template and it will start showing up your templates with your people hover panel.

enter image description here

Would advise you to not modify the OOTB display templates as Microsoft can push some changes to these templates which might break your customization. Instead of that, you should make a copy of the OOTB templates, customize them and then use that in your solution.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.