Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

How to pass curly brace inside sightly expression?

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 3

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.

View solution in original post

1 Reply

Avatar

Correct answer by
Level 3

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.