Question

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!

Était-ce utile?

La solution

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à sharepoint.stackexchange
scroll top