Foundation-sites: No {{{{raw}}}} in Foundation for Sites 6.3.1?

Created on 11 Apr 2017  Â·  4Comments  Â·  Source: foundation/foundation-sites

I need to use a W3 Data Provider and thus some variables like {{firstname}} {{lastname}} _unparsed_ by Panini (so w3data.js kann fill them in later).

In src/pages/index.html I tried:

<p>{{{{raw}}}}{{firstname}} {{lastname}}{{{{/raw}}}}</p>

but the parsed result becomes

<p> </p>

Is there no {{{{raw}}}} in Foundation for Sites 6.3.1 or am I making some stupid mistake?


I _can_ of course use front matter to circumvent this, but it feels kind of clumsy …

firstname: '{{firstname}}'
lastname: '{{lastname}}'
---
<p>{{firstname}} {{lastname}}</p>

_will_ parse to:

<p>{{firstname}} {{lastname}}</p>

Most helpful comment

That's not clear in the Handlebars documentation but the raw helper isn't built-in (even if there is some example in the docs).

You have 2 options:

The 1st option is better if you want to escape many variables while the 2nd option offers a lighter syntax if you just want to escape few variables.

All 4 comments

That's not clear in the Handlebars documentation but the raw helper isn't built-in (even if there is some example in the docs).

You have 2 options:

The 1st option is better if you want to escape many variables while the 2nd option offers a lighter syntax if you just want to escape few variables.

@Moonbase59 is this fixed your issue ??

Going to close this as it is a panini/handlebars issue rather than Foundation, but let us know if you continue to struggle with it.

@Deckluhm Cheers for the heads-up!
@IamManchanda Yepp, fixed.
@kball Can stay closed, thanks.

Was this page helpful?
0 / 5 - 0 ratings