Show manager in Display template

Hi,

I'm trying to change item display template for People search results. I've been able to add many OOB and custom properties as well, but somehow I can't make manager property to show in results.

I've add "'Manager':'Manager'" into the ManagedPropertyMapping, and I ran synchronization, but the manager doesn't appear in results.

Is it possible to show people property in search results?

Thanks,

Marek

April 16th, 2015 11:15am

Hi Marek,

To display the Manager in People search results, we need to make sure that the Manager property has been indexed in search service application.

Form your description, it seems that you have already created a manager property called Manager for the Manager property and mapped the crawled property People:Manager to the managed property Manager.

Then we need to enable Alias and Indexed in Search Settings in User Profile Service Application for Manager property.

After that, please do a full crawl and then search with Mamager:domain\username to see if the corresponding users will be displayed in People search results.

At last, we need to modify the Item_People.html which is the display template for people search results.

In addition to adding the mapping: Manager:Manager, we need to add the code below to display the Manager value in the search results:

<div>
Manager:_#= ctx.CurrentItem.Manager =#_                                             
</div>

More reference:

http://www.ableblue.com/blog/archive/2013/06/05/introduction-to-sharepoint-2013-display-templates/

Best regards,

Victoria

Free Windows Admin Tool Kit Click here and download it now
April 17th, 2015 2:22am

Hello,

Would your proposed solution display the manager property as the Manager's friendly name or would it in fact display the result in the template as domain\username?

I am looking for a way to display the Managers' friendly names.

Thank you!

July 13th, 2015 4:29pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics