Disable Quickview in Coveo for Sitecore Javascript Search

Pranay
May 16, 2020  ยท  3365 views

In Coveo for Sitecore (using Hive framework) search results page, by default we see a small icon to the extreme right of every search result. Clicking on this icon loads a popup with the preview/quickview of the page. This Quickview icon can be disabled.

Image Text

I am using Coveo for Sitecore version 4.1 along with Hive framework. If you need more details on the Coveo Hive framework check this link - Coveo for Sitecore Hive

In some cases we might want to disable the Quick view or hide this icon. This icon comes from the Coveo Hive default templates which gets installed with the Coveo for Sitecore package. So to disabled/hide this icon go to the default Coveo hive template and edit the code to disable it.

Template Path: \Website\Coveo\Hive\templates\default.cshtml

In this default.cshtml, we can find the below lines of code which is responsible to display the Quickview icon. By default this is already hidden for YouTube video results, so to hide the Quickview in all the cases just comment the line

as shown in the below code.

Before disabling the Quickview icon

  <div class="coveo-result-cell coveoforsitecore-time-cell">
        <% if (hasHtmlVersion && coveoFieldValue("filetype") !== "YouTubeVideo") { %>
                <div class='CoveoQuickview' data-fixed='true'></div>
        <% } %>
  </div>

After disabling the Quickview icon

  <div class="coveo-result-cell coveoforsitecore-time-cell">
        <% if (hasHtmlVersion && coveoFieldValue("filetype") !== "YouTubeVideo") { %>
                <!--<div class='CoveoQuickview' data-fixed='true'></div>-->
        <% } %>
  </div>

Hope this helps you. Please comments your thoughts if any.

AUTHOR

Pranay

A Software Engineer by profession, a part time blogger and an enthusiast programmer. You can find more about me here.


Post a comment




Thank you! You are now subscribed.

Sign up for our newsletter

Subscribe to receive updates on our latest posts.

Thank you! You are now subscribed.