SOLVED

Custom display and hover panel SP 2016

Brass Contributor

I am attempting to modify the advanced search results page. I want to remove some things from the result and add other metadata to that portion. I also want to open a preview of the PDF files that are in the result set when you hover over.

 

All examples of this are for 2013 and i have issues making them work.

First I do not see the js files and HTML files in the same location when I open SharePoint designer.

Second every example says that if i create the HTML file it will create the JS files automatically I have not found that to be the case either.

 

Is there an example for SP2016 that works? Am I missing something?

 

Thank you in advance!

13 Replies

Thank you for the reply. I attempted to map the network drive but get the following error:

I am doing this on the same box that sharepoint is installed and I am admin on that box.

 

 

map network drive.pngmap error.png

I did yes and that was my result, i can not map the drive on the machine where I have access.. i can map it from another machine but then i says i do not have permissions


@Deleted wrote:

Did you try instructions below?

 

https://docs.microsoft.com/en-us/sharepoint/dev/general-development/how-to-map-a-network-drive-to-the-sharepoint-master-page-gallery

 

 


 

I can now drop files into the mapped location. However when I drop an HTML file into the network location:\\drmspdev001@80\_catalogs\masterpage\Display Templates\Search

 

does not create any .js files.. as the document states should happen

Try going to web UI edit properties of html file set appropriate properties and check in and it should create a js file.

I dropped the HTML file in _catalogs/Masterpage/Display Templates/Search

opened the web UI and saw it existed then edited properties clicked ok (only thing changed is template level was not set so I selected Item)

 

No JS files created anywhere.

 

 

Under Master pages from top site settingsUnder Master pages from top site settingsPropertiesPropertiesSecond PropertiesSecond Properties

then edited properties

 

Did you publish the HTML version? once the HTML file gets published, the engine will automatically generate the associated  JavaScript file.

I do not see any commands to publish....

 

I am using SharePoint 2016, and SharePoint Designer


I do not think that this link is applicable to the master pages library where search display templates reside.. I do not have those options......

 

do not have that option.png

best response confirmed by michael meza (Brass Contributor)
Solution

Did you check if the publishing features are activated on Site Collection and Web / Site level?

When those are not activated the HTML-Files are usually missing. 

 

If you do not want to activate publishing features on this site you can create a Dev-Site with activated Publishing-Features and create your display templates via HTML-Templates there. Afterwards you can copy the .js file to the target site. Probably not a best practice but it works.

 

If those features are currently not active, I'm curious how you got into the Design Manager as these links are also only shown if publishing is activated.

yes this solved the issue thank you!
1 best response

Accepted Solutions
best response confirmed by michael meza (Brass Contributor)
Solution

Did you check if the publishing features are activated on Site Collection and Web / Site level?

When those are not activated the HTML-Files are usually missing. 

 

If you do not want to activate publishing features on this site you can create a Dev-Site with activated Publishing-Features and create your display templates via HTML-Templates there. Afterwards you can copy the .js file to the target site. Probably not a best practice but it works.

 

If those features are currently not active, I'm curious how you got into the Design Manager as these links are also only shown if publishing is activated.

View solution in original post