Friday, September 21, 2018

Computed fields in Coveo for Sitecore

Hi All,

Here below some references and sample code for understanding the computed fields in Coveo for Sitecore.

For get the computed field image
Location

Syntax for mvc:
//For get the image computed index value

{{ if (raw.@(Model.ToCoveoFieldName("imageurl"false))) { }}
                                                    
{{=image(raw.@(Model.ToCoveoFieldName("imageurl"false)), {alt : "Anything",style:"width: 100px;"})   }}
                                               
{{ } }}



//For get the field value
{{=raw.@(Model.ToCoveoFieldName("Sitecore Field"false))}


I hope you enjoy this Sitecore blog. Stay tuned for more Sitecore related articles.

Till that happy Sitecoring :)


Please leave your comments or share this article if it’s useful for you.