Walkthrough: Add tabs for custom scopes in Enterprise Search Center


in ,

When configuring SharePoint Search for customers I often help them configure their SharePoint Enterprise Search center. Companies usually index various content: SharePoint, Web Sites, File Shares, and it’s always good to divide different content sources with tabs, just as popular Search Engines like Google and Bing do.

Google Search with Tabs
Google Search with Tabs

So what do you need to do to have something similar in your SharePoint site? Here is the complete walkthrough.

Configuring Search Scopes

Before configuring search scopes you have to properly configure Content Sources, you should also read about managing Search Scopes.

  • Login to SharePoint Central Administration
  • Navigate to Central Administration > Application Management > Manage Service Applications > Your Search Service Application
  • In the Quick Launch click Scopes
  • Create a new scope: MyCustomScope
  • Once the scope is created, click Add Rules to add rules
  • Configure your scope to filter only results you want to display here e.g. only files from your file share
  • Save

Configuring Search Tabs

To configure Search Center you first need to create one (make sure SharePoint Standard and Publishing site collection features are enabled). I recommend installing SharePoint 2010 Master Page Adapters for Search so that your Search Center gets normal navigation.

Here is what you need to do to configure search pages:

  1. Navigate to your Search Centar
  2. Click Site Actions > New Page
  3. Enter page name, e.g.: MyCustomPage
  4. New page will open in Edit mode
  5. Find the Search Core Results web part and from the context menu choose the Edit Web Part option
  6. In the Web Part properties pane in the Scope field enter MyCustomScope
    (this field is located in the Core Results > Location properties group)
  7. Click Apply and then OK to close Web Part Pane
  8. Open Search Box web part properties with Edit Web Part option
  9. Enter MyCustomPage.aspx to Target search results page URL field in the Miscellaneous group
  10. Click Apply and then OK to close Web Part Pane
  11. Click Save on the Page ribbon to save the page
    Please note: If Pages library requires Check-in or approval, make sure you do both otherwise this page will only be visible to admins.

There are two lists you need to configure to get search tabs in place, these lists are located at:

  1. http://your_site_collection/your_search_site/SearchResults/AllItems.aspx
  2. http://your_site_collection/your_search_site/SearchCenter/AllItems.aspx

Add links to the MyCustomScope.aspx page.

After you have completed this you will have a new tab in your search center.

Enterprise Search Center with custom tab