Search tabs are a web control displayed
on the Enterprise Search Center. The purpose of search tabs is to allow
easy navigation between different search pages, each with their own
search Web Parts, layout, configuration, and scope.
Per default SharePoint creates the All Sites and the People tabs in
Enterprise Search Centers, as shown in Figure 1.
Figure 1. Search tabs
The tabs themselves are list items. Separate lists exist for the following:
- Tabs shown on the search pages
- Tabs shown on the results pages
The benefit of search tabs being list items is
that it makes all search pages share the same tabs, without affecting
the tabs defined for the results pages and vice versa. This way the
search pages for All Sites, People, and any other search page share
tabs. Similarly the results pages for All Sites, People, and any other
results page share tabs.
To add or edit existing tabs, select the Page tab from the ribbon and click Edit to put the page in Edit mode (Figure 2).
As mentioned before, the tabs editor is not a Web Part but a web
control. On the search dialog pages (and also on the results pages),
this control is displayed at the top of the page. The location can be
changed by editing the page's markup.
Figure 2. Search tabs edit control on page in Edit mode
To view, add, or edit existing tabs, click the
Edit Tabs link, which opens the list of existing tabs. The list shows
the default tabs for an Enterprise Search Center. Adding, editing, and
removing tabs is just like managing items in any other list.
On the search pages, three tabs are created per default, but only two tabs are visible on the Search dialog page (Figure 3). The two tabs with the tab name All Sites are actually pointing to different pages. The first one is pointing to default.aspx
, which is the search page normally viewed. The second one points to advanced.aspx
,
which is the page for advanced search. The final tab points to people.
On results pages, only two tabs are created per default.
Figure 3. Search tabs list
For new tabs to be meaningful, a new search page
or results page should be created. To create a new search page, do the
following:
- Go to an existing search page.
- Click Site Actions =>
More Options to open the list of page types. The filters in the left
menu are useful for quickly finding or trimming down the options to
choose from.
- Using the page filter (Figure 4),
three options are displayed, as shown here. Depending on whether
publishing is desired, choose the correct page type and click the Create
button.
Figure 4. Creating a publishing page
After choosing a page type and clicking the Create button, the Create Page dialog opens (Figure 5).
Here it is possible to apply some standard information to the new page.
The title will be displayed at the top of the page as well as in the
title bar of most browsers. The description is displayed just below the
title in smaller letters and gives users more detailed information on
the intent and usage of the page.
The URL Name specifies the file name of the
page. The page is created in a location relative to the site on which it
exists. The pages will always be of type *.aspx
. It is not possible to create other formats of web pages using this dialog.
The Page Layout section displays the available
pre-defined layouts for the given site. If the new page to be created is
a search page, choose “Search box” or “Advanced search” from the Page
Layout section. If the new page to be created is a results page, choose
“Search results” or “People search results” from the Page Layout
section.
Figure 5. Choosing a page layout of new page
Note The selection of page layout dictates if “Tabs in search pages” or “Tabs in result pages” will be used.
Choose the desired page layout, and click the Create button. The new page will open in Edit mode, as shown in Figure 6.
For Enterprise Search Centers, this page also include the Tabs web
control. Notice that the newly created page is not mapped to a specific
tab. This can be done from any of the search pages or search results
pages in Edit mode, depending on the target tab group for the new page.
Figure 6. New search page in Edit mode
To add the new search page to the search tabs
list, click Add New Tab. This is equal to going to the search tabs list
and adding a new item. On the new tab item (Figure 7),
give the tab a meaningful name and tooltip. The next step is to map the
page itself to the new tab. To do this, copy the URL of the newly
created page into the Page section.
Figure 7. Linking new tab to a page
When the tab name, tooltip,
and URL of the target page are entered, click the Save button. A new
search tab is now available for the new custom search page and all other
pages sharing the same tabs list, as shown in Figure 8.
Figure 8. Search dialog with custom tab
Results pages and tabs in results pages
are created the same way. Creating new tabs is an option to do more
complex search configurations and make them easily accessible to users.
In some scenarios, it might be that two tabs differ on the scope they
use only when searching. Some of the search settings, such as scopes,
are also possible to do on just one page by including a scope selector
control, but enabling this as a tab instead of a scope selector is
sometimes preferred. It does introduce some maintenance overhead when
adding new search pages and search results pages, but it also provides
the benefit of being able to fine-tune each page to meet specific
demands.