0

I am using sp2013. I have a page with a search result webpart. Inside this webpart I have a query ({searchboxquery} contentclass=spspeople) which shows all persons. At this moment you see this:

At this moment you the the picture, firsname, lastname, about me, ask me about, interest. enter image description here

But I would like to extend this information with "mobile phone number", "work email" in the item. In the mouse over window I would like to extend with "Home phone" and "Office". How can I do this?

Like you see below the information is filled in User Profile Service Application. I did already a full crawl on the people content source.

enter image description here

I have selected the people item display template. enter image description here

1

You will have to modify search item display template. First you will need to activate Publishing infrastructure feature, if it is not yet active. (It is not available in SP foundation).

After activation under _catalogs/masterpage/display templates/search directory in SP2013 there will be multiple javascript files, and html files (these will not be visible until you activate feature). Javascript files are automatically generated, so do not change them. There should be one html for hover panel and one for item itself. I would copy the files and not change the default ones.

To make Home phone/ office fields available you will need to add them to ManagedPropertyMapping element if they aren't already there, also you will have to include them in the search result type itself if they are not included by default.

After that just push out that property in position you want, save the files and javascript should be generated.

For more information http://www.myphotoadventures.nl/2014/05/21/sharepoint-2013-custom-display-template-for-content-by-search-web-part/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.