2. Customizing the User Interface
In the past, users
actively interacted with SharePoint search in two areas: constructing a
query and viewing the search results. SharePoint 2010 has extended the
Search user interface to make the process more interactive, particularly
in the conversational aspects of both querying and refining search
results. The Search user interface can be customized in the design of
the Search Center, in the query Web Parts, and in the results pages.
2.1. Choosing and Customizing the Search Center
In your enterprise
search design, you may choose to centralize all searches at a single
location or to customize and control search with local Search Center
sites. Although the search resources are provided at the application
level, customizations of the user interface will be managed at the site
collection level.
To permit
delegation of site collection search configuration to search
administrators who do not need site collection administrator rights to
other content, you may use managed paths to create a Search Center site
as a site collection root site with the appearance of a subsite in the
URL.
SharePoint 2010 offers three Search Center site templates.
Enterprise Search Center
This publishing site requires the Publishing Infrastructure feature to
be activated for the site collection, but it does not require its parent
to be a publishing site. This template was called Search Center With
Tabs in the previous version.
Basic Search Center
This template is appropriately named, because it offers only three
basic search pages and is not designed to support multiple instances of
the search pages.
FAST Search Center
This template is available even without FAST Search for SharePoint
installed, but it requires a FAST Search server for functionality. It is
a publishing site designed like the Enterprise Search Center except the
pages use FAST Search Web Parts where appropriate.
SharePoint 2010 uses the
Basic Search Center template to create the default Search Center site.
In most scenarios, this Search Center site should be replaced with one
created with either the Enterprise Search Center template or the FAST
Search Center template to make customization easier.
2.2. Customizing the Enterprise Search Center
As a publishing site, the Enterprise Search Center presents three features that ease customization.
All three
search pages templates provided within the UI are page layout templates
for the publishing process that are based on the Welcome page content
type.
All pages are stored in a publishing pages library with full publishing processes, approvals, and workflows available.
The
page layouts of the search and results pages contain a special field
control that organizes links to other search pages within customizable
tabs. Advanced Search pages do not have a Tabs field control. The Tabs
field control uses link information stored in one of two link lists.
The three search pages of the
Basic Search Center (default, advanced, and results) are Web Part Pages
designed with Web Part placement like the publishing templates, but
there is no provision for creating additional pages based on that design.
3. Creating New Search Pages
You can create a new search
page from the Site Actions menu of any Enterprise Search Center page. Do
not select New Page, as this does not create a publishing page with a
page template choice option. To create a search page, follow these
steps.
Select
More Options from the Site Actions menu to open the Create page. Note
that the presentation of this page varies greatly depending on whether
or not you have Microsoft Silverlight installed.
Select Publishing Page and click Create to open the Create Page page shown in Figure 13.
Enter the appropriate information in the Title, Description, and URL Name text boxes.
Select the appropriate page template.
Click the Create button to create the new page and open it in edit page mode.
Note:
You will not always need a set
of three pages for each customization. For instance, a single Search Box
(query) page can contain multiple search boxes, each pointing to a
unique search results page or People search results page. All search box
Web Parts may not require a corresponding Advanced Search page.
3.1. Creating New Tabs
When a search page is in the
edit page mode, the Tabs field control exposes links to management pages
for adding new tab links or editing existing tab links, as shown in Figure 14.
In this example, a custom tab has been added for a search page that
returns results from the Clients database, and the tooltip is exposed.
Clicking Edit Tabs opens the Tabs In Search Pages list page shown in Figure 15,
from which the control builds the tabs. The results pages also have a
tab control that uses another list, named Tabs In Search Results. Both
these lists can also be accessed from View All Site Content.
Clicking the Add New Item link or Add New Tab from the control on the page opens the dialog box shown in Figure 16.
The Tab Name field should indicate the purpose to users.
The Page field can point to an existing or future custom page. The
Tooltip field should expand to show the purpose of the search page.
After the custom set of
search pages and tabs are created, the new query page can be accessed
from its custom tab. The query Web Part can then point to the
appropriate custom results page, and the Advanced query link can point
to the appropriate custom advanced query page. When a user viewing a
results page selects another results page tab, the query passed to the
original page will be automatically passed to the results page opened by
the new tab.
This combination of publishing page templates for creating
custom search pages plus the controls that manage navigation tabs
within the pages presents a Search Center site that can be quickly and
easily customized to meet the search needs of your organization.
3.2. Configuring Custom Page Access
Although you have not yet learned about all of these, here are some of the ways that these custom pages can be accessed.
Site collections can be configured to use a remote set of search pages.
Scopes, both local and shared, can be configured for a specific results page.
Query Web Parts at any location can be configured to use a specific results page in another location.
More Results links on Federated Search Web Parts can point to custom results pages.
Advanced Search links can point to custom advanced search pages.
Links placed anywhere within your pages or link lists can point to custom query pages.
Group Policy can be used to pre-populate Internet Explorer Favorites links to custom query pages.
Internet Explorer and Windows Desktop Search can be configured to use custom query pages.
Microsoft Office applications can be configured to use search pages by URL.