Wednesday, November 8, 2017

Hide the "Follow" link on the hover panel for people search results

I had a request recently to hide the "Follow" link shown on the hover panel for people search results. Upon trying a number of different ideas, I found the easiest way to accomplish this task is to modify the display template associated with this functionality. See steps below.

1. At your search center site, go to Site Settings, and click on Master pages and page layouts under the Web Designer Galleries section.

2. Click on Display Templates > Search, and find the Item_Person_HoverPanel.html file. Download a copy of this file to your desktop.

3. Edit the file in notepad, and comment out the following line.

<div class="ms-calloutLink ms-uppercase" id="_#= followId =#_"></div>

My blog posts have been few and far between lately as I have been super busy pursuing an MBA at my dream school - Notre Dame. After finishing, I will post more!

Friday, March 3, 2017

Content Search Web Part: Subsites not sorting correctly

If you are one of many using the Content Search web part to display all subsites of a parent site, and the sorting by Site title is not working as expected, use the following tips to get it working correctly.

1) Use one of the refinable string managed properties and map it to the 'ows_SiteName' crawled property. I used the RefinableString00 managed property.

2) Create a new Result Source on the parent site. Site Settings > Results Sources (under Search). Create a New Result Source. Give it an appropriate name, scroll down, and click the 'Launch Query Builder' button. In the Query text box, add your query as needed. I used "path:"https://company.sharepoint.com/sites/sitename" contentclass:STS_Web  UrlDepth=3" to show the first level of subsites on my parent site. Next, click the SORTING tab, and select your refinable string managed property. Select the OK button.

3) In the Content Search web part query, click the link to 'Switch to Advanced Mode'. Select your newly created Results Source in the drop-down, and clear the Query text box. Select the OK button.

4) If your subsites are still not sorting correctly in the web part, try re-indexing them. On each subsite, go to Site Settings > Search and offline availability (under Search). Click the 'Reindex Site' button.