Product DocsMenu

Coveo Platform 7.0 >
Administrator Help > Coveo .NET Front-End 12.0 > Microsoft SharePoint Integration > Integrating the Search Box in My Site for SharePoint 2013 and 2016

Integrating the Coveo .NET Search Box in My Site for SharePoint 2013 and 2016

You can replace the Microsoft search box by the Coveo .NET search box for the My Site pages. On each SharePoint 2013 and 2016 front-end server, perform the following procedure to edit the template that applies the changes to the My Site page for all users.

Note: If you migrated your content from SharePoint 2010 to SharePoint 2013 and still use the SharePoint 2010 layout (14 mode) (see the Microsoft documents Upgrade to SharePoint 2013 and Upgrading from SharePoint 2010 to SharePoint 2013 Step by Step), you should rather use the procedure for SharePoint 2010 (see Integrating the Coveo search box in the My Site ASCX template) except that in this step, you must rather copy the ASCX file to the \Skins\SharePoint2013 folder.

To integrate the Coveo .NET search box in all My Site pages

  1. Using an administrator account, log in to the SharePoint 2013 or 2016 front-end server.

  2. Enable the Coveo Search Box feature for the My Site pages (see Activating or Deactivating the Coveo .NET Search Box in a SharePoint Site).

    Note: Enabling the Coveo Search Box feature from My Site will not enable it for other pages.

    Example: To replace the search boxes in the Home page, you must enable the Coveo Search Box feature when you click on the Site Setting while being on the Home page.

    With SharePoint 2013, enabling the Coveo Search Box feature will unfortunately not be enough to replace all the Microsoft default search boxes in My Site. You also need to modify three files as described in the following steps.

  3. Using a text editor, open the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\FEATURES\MySiteUnifiedNavigation\mysite15.master file, and then:

    1. At the beginning of the file, after the last existing <%@ Register TagPrefix="... line, add the following line:

      <%@ Register TagPrefix="cessp" Namespace="Coveo.CES.Web.Search.SharePoint.Controls" Assembly="Coveo.CES.Web.Search.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2" %>  
    2. Towards the end of the file, replace the following code segment:

      <div id="searchInputBox">
       <SEARCHWC:SearchBoxScriptWebPart runat="server" id="searchInputBox" DefaultDropdownNodeId="1001" ServerInitialRender="true" UseSharedSettings="true" ChromeType="none" EmitStyleReference="false"/>
      </div>

      with the following code segment:

      <div id="searchInputBox">
        <cessp:SharePointSearchBox runat="server" />
      </div>  
    3. Save the file.

  4. Using a text editor, open the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\SiteTemplates\SPSMSITEHOST\default.aspx file (default location), and then:

    1. At the beginning of the file, after the last existing <%@ Register TagPrefix="... line, add the following line:

      <%@ Register TagPrefix="cessp" Namespace="Coveo.CES.Web.Search.SharePoint.Controls" Assembly="Coveo.CES.Web.Search.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2" %>  
    2. Towards the end of the file, replace the following code segment:

      <div id="searchInputBox" class="ms-mpSearchBox ms-mysite-searchBox">
        <SEARCHWC:SearchBoxScriptWebPart runat="server" id="searchInputBox" DefaultDropdownNodeId="1003" ServerInitialRender="true" UseSharedSettings="true" ChromeType="none" EmitStyleReference="false"/>
        <SPSWC:MySiteSearchBoxDefaultOverride DefaultId="1003" runat="server" />
      </div>

      with the following code segment:

      <div id="searchInputBox" class="ms-mpSearchBox ms-mysite-searchBox">
        <cessp:SharePointSearchBox runat="server" />
      </div>  
    3. Save the file.

  5. Using a text editor, open the C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\15\TEMPLATE\FEATURES\SocialDataStore\SocialDataStoreList\sites.aspx file (default location), and then:

    1. At the beginning of the file, after the last existing <%@ Register TagPrefix="... line, add the following line:

      <%@ Register TagPrefix="cessp" Namespace="Coveo.CES.Web.Search.SharePoint.Controls" Assembly="Coveo.CES.Web.Search.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=44110d16825221f2" %>  
    2. Towards the end of the file, replace the following code segment:

      <div class="ms-contentFollowing-searchBox ms-tableCell ms-verticalAlignTop">
      	<SEARCHWC:SearchBoxScriptWebPart runat="server" id="searchInputBox" DefaultDropdownNodeId="1001" ServerInitialRender="true" UseSharedSettings="true" ChromeType="none" EmitStyleReference="false"/>
      </div>   

      with the following code segment:

      <div class="ms-contentFollowing-searchBox ms-tableCell ms-verticalAlignTop"><cessp:SharePointSearchBox runat="server" />
      </div>  
    3. Save the file.

  6. Reload the My Site page of a user to verify that the Coveo search box is now appearing in the top navigation section of the page.

  7. Repeat the procedure for each SharePoint 2013 or 2016 front-end server.

People who viewed this topic also viewed