Hi,
I am using CoveoSearch Interface for search in my Sitecore Page.When there are no Search Results i am getting "Your query did not match any documents.".As per our client requirement If i get like this i should hide Header Block.How to this.
Thanks, Naga
Answer by Vincent Séguin · Aug 19, 2014 at 07:42 AM
Hi Naga,
Are you in .NET or in JS UI? If you're using the JS UI, you could easily hook yourself on the 'noResults' event of the search component and hide the header block there.
For example :
Coveo.$('#search').on('noResults', function (e, data) {
Coveo$.('#myHeaderBlock').hide();
});
To make sure it works, don't forget to show it back again on a querySuccess event.
Might be simpler to just listen for querySuccess and using .toggle depending on whether totalCount is 0 or not.
How does CES determine the precedence of items when no facet is selected 1 Answer
how to create custom range facet 1 Answer
Coveo Search API 8 error 0 Answers
Problem with Angular Routes, coveo cuts out route 1 Answer
Visualforce Component markup sometimes get reformatted for no apparent reason 2 Answers