Coveo for Sitecore Legacy Search UI Framework - Overview of CoveoSearchResources.ascx
Coveo for Sitecore Legacy Search UI Framework - Overview of CoveoSearchResources.ascx
CoveoSearchResources.ascx is a sublayout file that includes a set of dependencies or resources used by a search interface.
Its default location is c:\inetpub\wwwroot\SitecoreInstanceName\Website\layouts\Coveo\CoveoSearchResources.ascx.
Digging into Its Code
The code of CoveoSearchResources.ascx is rather straightforward:
-
It includes these dependencies:
-
Stylesheets, which defines the appearance of a search interface. You could easily override those styles by adding your own stylesheet, therefore allowing you to change the look and feel of your search interface.
-
JavaScript libraries used by the JavaScript Search Framework V1.0, as Coveo for Sitecore embeds a version of it. Therefore, when you previewed your search interface in the Sitecore Page Editor, what you actually saw was the JavaScript Search Framework in action.
-
-
It contains a standard
asp:PlaceHoldercontrol, which is only used to display theCoveo Search Resourcesstring.
<%@ Control Language="c#" AutoEventWireup="true" Inherits="Coveo.UI.CoveoSearchResources" TargetSchema="http://schemas.microsoft.com/intellisense/ie5" %>
<%@ Register TagPrefix="coveoui" Namespace="Coveo.UI.Controls" Assembly="Coveo.UIBase" %>
<!-- When customizing this component, ensure to use "Coveo.$" instead of the regular jQuery "$" to
avoid any conflicts with Sitecore's Page Editor/Experience Editor. -->
<coveoui:ErrorSummary runat="server" />
<coveoui:WhenConfigured runat="server">
<link rel="stylesheet" href="/Coveo/css/CoveoFullSearchNewDesign.css" />
<link rel="stylesheet" href="/Coveo/css/CoveoComponent.css" />
<script type="text/javascript" src="/Coveo/js/CoveoJsSearch.WithDependencies.min.js"></script>
<% if (IsInSitecore80ExperienceEditor()) { %>
<script>
jQuery.noConflict();
</script>
<% } %>
<script type="text/javascript" src="/Coveo/js/CoveoForSitecorePolyfills.js"></script>
<script type="text/javascript" src="/Coveo/js/d3.min.js"></script>
<script type="text/javascript" src="/Coveo/js/CoveoForSitecore.js"></script>
<% if (SitecoreContext.IsEditingInPageEditor()) { %>
<script type="text/javascript" src="/Coveo/js/PageEditorDeferRefresh.js"></script>
<% } %>
<asp:PlaceHolder ID="PHPageEditor" runat="server">
<div>Coveo Search Resources</div>
</asp:PlaceHolder>
</coveoui:WhenConfigured>
What’s next?
Proceed to reading Overview of CoveoSearch.ascx.