I recently had the opportunity to dive into Coveo search for Sitecore. This article assumes that you have installed Coveo successfully, have it working against Sitecore, and are wondering what is next.
Coveo provides an out of box MVC solution to start from. You can add this to your content tree, publish, and assuming you got everything working, you should see a search.
Take a look at the presentation layer for this new item. You will find two views:
Now the other view, Coveo Search View, is where you would make modifications to the html. I found that there are two primary elements / considerations to make when looking at this view.
The first would be the configuration. You will see a bunch of references to the model like this:
This is all configuration you can change on the rendering parameter, and considering this works with a rather large js file, I would be real careful about making modifications here. Here is an example of some (its a big list) of the configurations in the rendering parameter:
The second element in this file starts with the div class of CoveoResultList. This houses the majority of html. This is where you can modify how search displays and what fields to display. For example the div class “coveo-result-row” holds a lot of these changes you can make:
The ToCoveoFieldName method takes a Sitecore field and translates it to field name stored in the Coveo search index. In other words, assuming the Sitecore field lives in your index, you should be able to add it here.
And as always don’t work from the source. Make copies of the rendering views before you start heavily modifying. There is nothing fun about pulling your hair out digging for originals while your very cold rooster mocks you.