More Handlebars Questions

With the move to Handlebars, it seems most of the GUI has disappeared. No script to edit… any formatting has to be done with handlebars expressions… ughh.

I’m building a Web Section. My data model contains fields that are HTML hyperlinks. Instead of getting the hyperlink, I get the full text of the hyperlink. Even though in the Data Map I type the field as an “HTML String”, the HTML doesn’t “parse” in the template. With no script to edit, and no formatting menu, I’m at a loss as to how to “force” the handlebar expression to emit the HTML String as HTML.

image

Hi @TGREER,

I assume the expression looks like this: {{link}}

If it involves an HTML value it needs to look like this instead: {{{link}}}

A triple-stache means “insert the value as-is, don’t HTML-escape it”. This is not normally something you need to do manually. The designer automatically inserts a triple-stache if you drag an “HTML String” field to the editor, and it automatically inserts a triple-stache if you add a dynamic table and include an “HTML String” field.

Please note that Handlebars is optional and can be used in combination with regular scripts, keeping in mind that automatic Handlebars evaluation (the “Evaluate Handlebars expressions” setting in the section properties) runs first.

1 Like