Enabling the Scope Selector in Microsoft SharePoint
![]() |
Scope selector |
![]() |
Coveo search box integrated in Microsoft SharePoint |
As a Coveo administrator, you can enable the scope selector in Microsoft SharePoint by editing the searchBox.ascx file in the skin used by your SharePoint interface.
Note: In the case of a SharePoint farm, you must perform the following procedure for each SharePoint server.
To enable the scope selector in Microsoft SharePoint
-
Using an administrator account, connect to the SharePoint server on which Coveo is installed.
Important: It is not recommended to customize the default skins provided by Coveo. Default skins are overwritten when upgrading CES. The best practice is to create a renamed copy of the default skin, and then modify and use the new skin.
-
Unless you are already using a custom skin, in the [.Net_Front-End_Path]\Web\Coveo\Skins\ folder:
-
Make a copy of the SharePoint folder.
-
Rename the folder copy to the name of your choice.
Example: SharePointScopeSelector
-
-
Using a text editor:
-
Open the searchBox.ascx file from your new skin folder.
-
Add the following lines of code:
<td style="padding-right: 2px"> <select id="DDLScope" runat="server"/> </td>
as shown in the following excerpt (after line 12):
<table cellspacing="0" cellpadding="0"> <tr> <td> <input type="text" id="TXTQuery" style="font-size: 9pt" runat="server"/> </td> <td style="padding-left: 2px"> <% ((BetterImage) BTNSearch).ImageUrl = SearchBox.SearchImage.Resolve(); %> <% ((BetterImage) BTNSearch).HoveredImageUrl = SearchBox.SearchHoveredImage.Resolve(); %> <% ((BetterImage) BTNSearch).ToolTip = SearchStrings.Search; %> <% ((BetterImage) BTNSearch).Style["cursor"] = "pointer"; %> <cnlb:BetterImage id="BTNSearch" runat="server"/> </td> <td style="padding-right: 2px"> <select id="DDLScope" runat="server"/> </td> </tr> </table>
-
Save the file.
-
-
Reset IIS on the server to make the changes effective (see Resetting IIS).
-
Unless you modified an existing custom skin, you must now configure the SharePoint search interface to use the new skin that you created:
-
Using a Coveo administrator account, access a SharePoint page where the Coveo search box appears, and then launch any query to open the search interface.
-
In the upper-right corner of the .NET search interface, in the Do More menu, select Edit this Interface.
Note: The Edit this Interface command of the Do More menu only appears for a Coveo administrator.
The Interface Editor opens with the SharePoint interface as the current interface.
-
Under Basic Configuration, in the Skin drop-down list, select the new skin that you created.
Note: The new skin will appear only after performing the IIS reset.
-
Click Apply.
-
-
Validate that the scope selector is available to users:
-
Clear the cache of your browser and then close the browser.
-
Restart the browser, open a SharePoint page where the Coveo search box appears to verify that the scope selector appears next to the search box.
-