Gravatar for

Question by arucha01, Aug 5, 2016 9:23 AM

Is it possible to add Facet and Sort components to 'Search View Layout WebCrawler'?

Only search results are available upon creating a page based upon 'Search View Layout WebCrawler'. Is it possible to customize this to add Facet and sort components? Reference -

1 Reply
Gravatar for

Answer by Sébastien Belzile, Aug 5, 2016 9:53 AM

It is, indeed, but this will require some work on your side.

The page has to be entirely built server-side. We have this tutorial, which explains how to build your queries using LINQ. You are interested in this page: It explains how to add facets. The sorts component are not really required since the page is for web crawlers (an image or some HTML could be OK).

I need to mention that this tutorial was written with the latest version of C4SC 4.0 (July 2016) and that some modifications were made to make it easier. In other words, this tutorial does not apply to earlier versions.

I also have to tell you that even though Coveo supports LINQ development, it is not a practice we encourage.

Gravatar for

Comment by arucha01, Aug 5, 2016 10:48 AM

Hi … Thanks for your answer. I have another related question, we have a page using JS and works fine but as web crawlers don't read JavaScript very well so we were looking into using the WebCrawler layout. If we create a new Device in sitecore, call it 'WebCrawler' and assign the layout 'Search View Layout WebCrawler' to get the results from server side. Will this ensure that any web crawler will see the page based upon the WebCrawler layout instead of the 'default' device layout? If this works then we don't need to worry about adding facets and sort components to web crawler layout.

Gravatar for

Comment by Sébastien Belzile, Aug 5, 2016 11:04 AM

It is a little bit more complicated than that, but this is the way to go.

Naming your device 'WebCrawler' will not ensure that web crawlers will get this particular layout. You need to provide a way for Sitecore to detect web crawlers This page: explains how to configure your device for web crawler detection.

The page is a little outdated though, maybe you should look directly Sitecore's documentation:

Ask a question