Gravatar for erkan.yildiz@avanade.com

Question by erkany, Jan 8, 2015 2:58 PM

Coveo Search View customizations

Hi,

Is it possible to display a custom text when there is no results ( currently seeing: Your query did not match any documents. )

1 Reply
Gravatar for vseguin@coveo.com

Answer by Vincent Séguin, Jan 9, 2015 9:46 AM

Hi Erkan,

1) In your search page layout, just before the coveo init that should look like this :

   Coveo.$(function() {
        Coveo.$('#search').coveoForSitecore('init', CoveoForSitecore.componentsOptions);
    });

You can add something like :

       String["toLocaleString"]({
            "en": {
                "QueryDidntMatchAnyDocuments": "This is my custom error message."
            }
        });

2) I will let someone from the JSUI answer on this one.

Gravatar for erkan.yildiz@avanade.com

Comment by erkany, Jan 9, 2015 9:50 AM

Vincent, perfect the custom error message worked!

Gravatar for erkan.yildiz@avanade.com

Comment by erkany, Jan 9, 2015 1:37 PM

Marking this as correct answer for custom error text.Will open a new question for the other item

Ask a question