Skip to main content
Jan 25, 2019 7:03 AM UTC
Question

How to provide default value in if condition in sightly

I have a scenario where I have to provide a default value in data-sly-test expression if expression property does't exists. like below

     <sly data-sly-test="${properties.abc | 'xyz'}"> ${properties.pqr} </sly>

​Please help on this.

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

1 reply

Feike_Visser1
Adobe Employee
Adobe Employee
Jan 25, 2019 7:17 AM UTC

to me you can do this with ||

Translate