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>
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:
raw helper you want: http://handlebarsjs.com/block_helpers.html#raw-blocks\ just before your variable: http://handlebarsjs.com/expressions.html#escapingThe 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.
Most helpful comment
That's not clear in the Handlebars documentation but the
rawhelper isn't built-in (even if there is some example in the docs).You have 2 options:
rawhelper you want: http://handlebarsjs.com/block_helpers.html#raw-blocks\just before your variable: http://handlebarsjs.com/expressions.html#escapingThe 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.