This component is meant to exist within a result template. It allows to create a button/link inside the result list that opens a modal box for a given result.
Most of the time, this component will reference a QuickviewDocument in its content template.
The Quick View uses any HTML structure you put inside its tag and uses that as the content of the dialog box. This content can thus be any element you decide, using your CSS and your structure.
You can change the appearance of the Quick View link by adding HTML inside the body of the div.
You can change the content of the Quick View link by specifying a template ID.
You can use the methods of the CoreHelpers in the template.
<!-- This would change the appearance of the quickview button itself in the result. --> <div class="CoveoQuickview" data-template-id="TemplateId"> <span>Click here for Quickview</span> </div> <!-- This would modify the content of the quickview when it is opened in the modal box --> <script class='result-template' type='text/underscore' id='TemplateId' > <div> <span>This is the content that will be displayed when you open the Quick View. You can also include any other Coveo components.</span> <table class="CoveoFieldTable"> <tr data-field="@liboardshorttitle" data-caption="Board" /> <tr data-field="@licategoryshorttitle" data-caption="Category" /> <tr data-field="@sysauthor" data-caption="Author" /> </table> </div> </script> <!-- Note that this is all optional: Just including a <div class='CoveoQuickview'></div> will do the job most of the time, and will include a default template and default button appearance -->
Specifies whether the quickview is always shown, even when the index body for a document is empty.
In such cases, the Quickview.options.contentTemplate specifies what appears in the quickview.
If there is no quickview for the document, you MUST specify a contentTemplate otherwise the component will throw an error when opened.
Specifies the template to use to present the Quick View content in the modal window.
Specifies whether to show the document date in the Quick View modal window header.
The default value is
Specifies the Quick View modal window size (width and height) relative to the full window.
The default value is 95% on a desktop and 100% on a mobile device.
Specifies the title of your choice that appears at the top of the Quick View modal window.
Close the quickview
Return the debug info about this component.
Disable the component. Normally this means that the component will not execute handlers for the framework events (query events, for example). Component are enabled by default on creation.
Enable the component. Normally this means that the component will execute handlers for the framework events (query events, for example). Components are enabled by default on creation.
Return the bindings, or environment, for the current component.
Open the quickview
Get the bound component to the given HTMLElement. Throws an assert if the HTMLElement has no component bound, unless using the noThrow argument.
If there is multiple component bound to the current HTMLElement, you must specify the component class.
HTMLElement for which to get the bound component.
Optional component class. If the HTMLElement has multiple components bound, you must specify which one you are targeting.
Boolean option to tell the method to not throw on error.
Allows the component to bind events and execute them only when it is enabled.
Contains the state of options for differents component. Mainly used by ResultLink.
Contains the state of different component (enabled vs disabled). Allows to get/set values. Trigger component state event when modified. Each component can listen to those events.
A disabled component will not participate in the query, or listen to ComponentEvents.
Allows component to log in the dev console.
Contains the singleton that allows to trigger queries.
Contains the state of the query. Allows to get/set values. Trigger query state event when modified. Each component can listen to those events.
A reference to the root HTMLElement (the SearchInterface).
A reference to the root of every component, the SearchInterface.
A reference to the Analytics.client.
The static ID that each component need to be identified.
For example, SearchButton -> static ID : SearchButton -> className : CoveoSearchButton
The HTMLElement on which to create the component. Used to bind data on the element.
The unique identifier for this component. See : IComponentDefinition.ID. Used to generate the unique Coveo CSS class associated with every component.
The environment for every component. Optional, but omitting to provide one will impact performance.