Is the mini contact card, as seen in the People Matches section of a standard SharePoint 2010 search results page, a reusable component easily applied elsewhere?

It has all of the bits we want to use as a "this person is responsible for the content on this page"-type card tucked into the sidebar of pages throughout our site(s). Icon-sized profile photo, presence slug with Outlook integration, name/title/department, and a link to the profile page, all in one neat package. It would be nice to be able to place a simple control on the page, assign it a user identity, and let the rest happen automatically.

Unfortunately, I can't find anything describing this as a reusable component. It might just be a styled presentation baked into the People Matches web part.

If there's something similar available, despite not being in exactly this format, I'd be happy to look at that as well.

No worries about having to dig down into Visual Studio code to make this work. I'm already doing a lot of other custom coding on this project.

  • You can check out the markup of the people result page to see whether it's a seperate webpart or not, I'm not sure. If it is, see if there's properties to feed it it's data (like DataSource), perhaps that will help you get there. But my experience with undocumented stuff is that's it's probably easier just to create the same experience in a custom webpart yourself. – Jasper Oct 5 '11 at 20:27

The Mini contact card is actually just XSLT inside of the People core results web part card and can be found on the peoplresults.aspx Searth results page (SearchCenter/pages/peopleresults.aspx).

Anyways, to re-use the contact card, I suggest you grab the XSLT and stick it into your own XML Viewer web part. You've gotta know a bit of XSLT to modify it though. I tried to paste the whole XSLT here, but it's too big, so i'll explain to you how to get it.

Edit the SearchCenter/Pages/peopleresults.aspx page. Edit the "People Search Core Results" web part. Untick the setting "Use Location Visualization" Click on XSL Editor.

Now you can copy out the Existing XSLT for this web part which includes the markup / XSL for the Mini contact card.

Remember if you are going to add additional fields to your XSL that you need to add them as Parameters.

Hope this helps.

| improve this answer | |
  • Although I ended up creating a custom contact card, this looks like the answer to my question. Thanks. – jonblock Mar 30 '12 at 21:06

If I follow correctly you are referring to the people federated results webpart on the main search results page.

From exporting mine the following are the settings:

  <webPart xmlns="http://schemas.microsoft.com/WebPart/v3">
      <type name="Microsoft.Office.Server.Search.WebControls.FederatedResultsWebPart, Microsoft.Office.Server.Search, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c" />
      <importErrorMessage>Cannot import this Web Part.</importErrorMessage>
        <property name="PageSize" type="int">-1</property>
        <property name="EnableNicknames" type="bool">True</property>
        <property name="LoadingImageToolTip" type="string">Loading federated results.</property>
        <property name="ChromeState" type="chromestate">Normal</property>
        <property name="HelpMode" type="helpmode">Modeless</property>
        <property name="IsLocationPeople" type="bool">False</property>
        <property name="Height" type="string" />
        <property name="AllowMinimize" type="bool">True</property>
        <property name="ParameterBindings" type="string" />
        <property name="AllowConnect" type="bool">False</property>
        <property name="MoreLinkLabel" type="string">View more people »</property>
        <property name="XslLink" type="string" null="true" />
        <property name="ExportMode" type="exportmode">All</property>
        <property name="DataSourcesString" type="string" />
        <property name="MoreLinkUrl" type="string" null="true" />
        <property name="AllowHide" type="bool">True</property>
        <property name="ShowMoreLink" type="bool">True</property>
        <property name="EnableStemming" type="bool">False</property>
        <property name="LoadingImageUrl" type="string">/_layouts/images/gears_an.gif</property>
        <property name="Title" type="string">People Matches</property>
        <property name="LoadAsynchronously" type="bool">True</property>
        <property name="AsyncRefresh" type="bool">False</property>
        <property name="DisplayName" type="string" />
        <property name="ChromeType" type="chrometype">None</property>
        <property name="ViewContentTypeId" type="string" />
        <property name="UseLocationVisualization" type="bool">True</property>
        <property name="TitleUrl" type="string" />
        <property name="FireInitialRow" type="bool">True</property>
        <property name="ViewFlags" type="Microsoft.SharePoint.SPViewFlags, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c">None</property>
        <property name="DataFields" type="string" />
        <property name="Hidden" type="bool">False</property>
        <property name="AllowEdit" type="bool">True</property>
        <property name="MissingAssembly" type="string">Cannot import this Web Part.</property>
        <property name="HelpUrl" type="string" />
        <property name="InitialAsyncDataFetch" type="bool">False</property>
        <property name="PropertiesToRetrieve" type="string" null="true" />
        <property name="IgnoreNoise" type="bool">True</property>
        <property name="DataSourceID" type="string" />
        <property name="ListName" type="string" null="true" />
        <property name="Width" type="string" />
        <property name="Default" type="string" />
        <property name="Direction" type="direction">NotSet</property>
        <property name="ViewFlag" type="string">0</property>
        <property name="Location" type="string">LocalPeopleSearchIndex</property>
        <property name="ShowLoadingImage" type="bool">False</property>
        <property name="ListUrl" type="string" null="true" />
        <property name="Description" type="string">This webpart displays people results matching the user query.</property>
        <property name="CharactersInSummary" type="int">185</property>
        <property name="AutoRefreshInterval" type="int">60</property>
        <property name="AppendedQuery" type="string" null="true" />
        <property name="ListDisplayName" type="string" null="true" />
        <property name="TitleIconImageUrl" type="string" />
        <property name="DefaultRankingModelID" type="string" />
        <property name="ResultsPerPage" type="System.Int16, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089">3</property>
        <property name="ManualRefresh" type="bool">False</property>
        <property name="PageType" type="Microsoft.SharePoint.PAGETYPE, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c">PAGE_NORMALVIEW</property>
        <property name="AutoRefresh" type="bool">False</property>
        <property name="RemoveDuplicates" type="bool">True</property>
        <property name="AllowZoneChange" type="bool">True</property>
        <property name="UseSQLDataSourcePaging" type="bool">True</property>
        <property name="NoDefaultStyle" type="string" />
        <property name="FixedQuery" type="string" null="true" />
        <property name="ShowMessages" type="bool">False</property>
        <property name="CacheXslTimeOut" type="int">86400</property>
        <property name="SampleData" type="string" null="true" />
        <property name="Xsl" type="string" />
        <property name="CacheXslStorage" type="bool">True</property>
        <property name="ListId" type="System.Guid, mscorlib, Version=, Culture=neutral, PublicKeyToken=b77a5c561934e089">00000000-0000-0000-0000-000000000000</property>
        <property name="EnablePhonetic" type="bool">True</property>
        <property name="CharactersInUrl" type="int">25</property>
        <property name="ShowWithSampleData" type="bool">False</property>
        <property name="DateFormat" type="Microsoft.SharePoint.Utilities.SPDateFormat, Microsoft.SharePoint, Version=, Culture=neutral, PublicKeyToken=71e9bce111e9429c">DateOnly</property>
        <property name="AllowClose" type="bool">True</property>
        <property name="XmlDefinitionLink" type="string" />
        <property name="CatalogIconImageUrl" type="string" />
        <property name="XmlDefinition" type="string" />

I'm not sure if this will provide the logic against the page owner you require?

If not then you could always create a custom control to read the page owner property and display the same output html as this webpart.

| improve this answer | |
  • Thanks, but I'm not sure this is what I'm looking for. This seems to be a listing of the web part's properties (as stored in the page), while the key functionality remains locked up in the Microsoft.Office.Server.Search.WebControls.FederatedResultsWebPart control. – jonblock Oct 31 '11 at 14:23

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.