How to pass curly brace inside sightly expression? | Community
Skip to main content
New Participant
October 7, 2017
Solved

How to pass curly brace inside sightly expression?

  • October 7, 2017
  • 1 reply
  • 2913 views

Hi, I have snippet like this:

<sly data-sly-use.svg="${'/apps/foobar/svg.js' @ pngPath={{iconPath}}, iconSize='xs', title={{label}}, desc='', alt={{label}}}">

                                ${svg.html @ context= 'unsafe'}

                            </sly>

I'd like to pass the handlebars expression using double curly braces '{{ foo }}' to the sightly variable, but I got error

token recognition error at: '{'

I think it because sightly process curly brace and not bypass it. How can I pass that curly brace?

Thank you.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by awadheshv

I'd like to pass the handlebars expression using double curly braces '{{ foo }}' to the sightly variable, but I got error

token recognition error at: '{'

This is not possible, sightly is executed at server, the handlebars variable is available only on the client browser.

1 reply

awadheshvAccepted solution
New Participant
October 7, 2017

I'd like to pass the handlebars expression using double curly braces '{{ foo }}' to the sightly variable, but I got error

token recognition error at: '{'

This is not possible, sightly is executed at server, the handlebars variable is available only on the client browser.