Contents
How to display custom properties in hover panel?
How to display values from custom managed properties in the hover panel in SharePoint Server showed how the hover panel actions are rendered by the Item_Common_HoverPanel_Actions display template. So, to add a custom action, you have to edit this file.
Here are the steps to add a custom action to the hover panel: Find the managed property name of the site column that you want to use. How to display values from custom managed properties in classic search results – option 1 in SharePoint Server showed how to do this. In your mapped network drive, open an item display template.
How to customise display templates in SharePoint Designer?
You need not even have SharePoint Designer to do this, you can simply use NotePad++ to customise the Display templates. Copy the existing Item Template HTML file Modify it upload it. When you upload HTML file a JS file with same name would be automatically created. Each result type contains a reference to an item display template.
How to add custom actions to search hover panel?
Adding custom actions to a search hover panel is completely different than when you are doing it for an item/document callout. When adding a custom action to item or document callout you will be able to override the default footer with your own custom actions.
How to display values from custom managed properties in search results?
In How to display values from custom managed properties in search results – option 2 in SharePoint Server we showed you how to display values from custom managed properties with hit highlighting, and get automatically improved relevancy based on end-user click behavior. In this article, you’ll learn:
Are there any advantages to overriding default hover panels?
The advantage is that you can quickly override the default hover panel actions template by your own version. The disadvantage of this approach is that you change the template actions of all the hover panels. So if you only want to do this for a specific type of data, this is not the best approach.