Gravatar for maguire_matthew@bah.com

Question by mmaguir3, Dec 6, 2016 12:23 AM

JSRender Syntax in Insight Panel Advanced Content

I am attempting to do some simple logical checks in and Advanced Content element of an insight panel. Typical JSRender syntax does not seem to work. Something like:

{{ if raw.somefield}} My text here {{/if}}

causes a syntax error. When I try to use Underscore, it displays "{{html:", which seems to be an attempt to interpret the code as JSRender. Could someone point me towards documentation on this subject, or an example to get this working? Thanks.

Gravatar for maveilleux@coveo.com

Comment by maveilleux, Dec 6, 2016 5:59 AM

What product and version are you using?

Gravatar for maveilleux@coveo.com

Comment by maveilleux, Dec 6, 2016 6:03 AM

By the way, here's our documentation about underscore templates:

Salesforce V1 / JSUI 0.9: https://developers.coveo.com/display/public/JsSearch/Result+Templates

Salesforce V2 / JSUI 1.0: https://developers.coveo.com/display/public/JsSearchV1/Underscore+Result+Template

Gravatar for maguire_matthew@bah.com

Comment by mmaguir3, Dec 7, 2016 10:43 AM

We are using Coveo for Salesforce V1. Could the problem be that we are putting the code directly in the Advanced Content element? I thought that something simple like the above code would be okay to enter this way.

0 Reply
Ask a question