Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am using People Search Core Results in Content Query Web Parts to display departmental staff directories.

A request that comes up regularly from users is to be able to make the Team Leader or Manager of each department appear first (regardless of their name, which is how the departments are currently ordered), and ideally with some kind of CSS-based design embellishment to highlight and/or label them make them stand out from the other staff.

I have added a checkbox column to staff profiles to be ticked if they are a manager, so this can be used to differentiate manager from non-manager, but I've not come up with any way of conditionally formatting the search results based on the value in this column.

Has anyone managed to achieve a similar feature in Sharepoint who could give me a few pointers? :-)

Cheers,

Luke

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You have to do several steps for the highlighting

  1. Create a search managed property with your flag: http://technet.microsoft.com/en-us/library/ff621097(v=office.14).aspx#section2
  2. Map the crawled property of your flag to the managed property you created
  3. Do a full crawl
  4. Alter the fetched properties of the core result webpart and fetch your new managed property.
  5. Uncheck use localization visualization in the core result webpart properties
  6. Adjust the xslt rendering in the XSL Editor in the core result webpart to do the highlighting/css.

If you want to rank managers higher you need to adjust the ranking model - this article explains how: http://jopx.blogspot.de/2013/10/understanding-sharepoint-2010-search.html (I would not change the ranking, its complicated and implications are hard to tell...)

share|improve this answer
    
Hi Max, thanks for your reply! :-) I'll take a look at the links and see if I can get it working. Luke –  Luke T Dec 9 '13 at 16:25
2  
After setting up the managed property then instead of changing the ranking I'd just use two Search web parts (remember to change the query number) one showing managers and the other showing non managers –  Per Jakobsen Dec 9 '13 at 16:31
1  
Added step 3 :) –  Max Melcher Dec 9 '13 at 16:57
    
Thanks Max, I was able to get the desired results by following your advice. Much appreciated! :-) –  Luke T Dec 23 '13 at 9:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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