THIS IS ARCHIVED DOCUMENTATION

Coveo for Sitecore Legacy Search UI Framework - Overview of SearchLayout.aspx

Coveo for Sitecore 4.1 (November 2018)

SearchLayout.aspx is the basic layout file used by a Coveo-Powered Search Page item. It provides the basis for building a full-featured search interface. Its default location is c:\inetpub\wwwroot\SitecoreInstanceName\Website\layouts\Coveo\Search Layout.aspx.

Digging into Its Code

The code of SearchLayout.aspx is straightforward:

  • It uses standard HTML and ASP.NET markup to build a web page.
  • It contains a sc:placeholder element into which you can drop components (or, more precisely, sublayouts), such as the Coveo Search component.
    • Notice the value of its key attribute: coveo-search. This is what you use to refer to this placeholder.
<%@ Page Language="c#" Inherits="System.Web.UI.Page" CodePage="65001" %>
<%@ Register TagPrefix="sc" Namespace="Sitecore.Web.UI.WebControls" Assembly="Sitecore.Kernel" %>
<%@ OutputCache Location="None" VaryByParam="none" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title><%= Sitecore.Context.Item.DisplayName %></title>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta http-equiv="X-UA-Compatible" content="IE=11" />
        <link href="/default.css" rel="stylesheet" />
        <sc:VisitorIdentification runat="server" />
    </head>
    <body>
        <form id="mainform" method="post" runat="server">
            <div id="MainPanel">
                <div id="coveo-center-column">
                    <sc:placeholder key="coveo-search" runat="server" />
                </div>
            </div>
        </form>
    </body>
</html>

What’s Next?

Proceed to reading Overview of CoveoSearchResources.ascx.