Usage of data-sly-test along with && and || conditions | Community
Skip to main content
Level 9
March 8, 2016
Solved

Usage of data-sly-test along with && and || conditions

  • March 8, 2016
  • 2 replies
  • 19219 views

Hi All,

I have a condition to be used in data-sly-test as below :

data-sly-test="${(condition1 || condition2) && condition3}". This doesn't seem to be working as expected.

Is the above correct and works fine in Sightly. If not, any thoughts/pointers will be helpful.

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 kautuk_sahni

Hi

Please have a look at following post for the reference:-

Link:- http://stackoverflow.com/questions/32531189/condition-statements-in-sightly

Link:- http://stackoverflow.com/questions/24550498/conditional-attributes-in-sightly-templates-aem-cq

Link:- https://docs.adobe.com/docs/en/aem/6-1/develop/sightly/expression-language.html

We have Ask the expert session to deep dive into sightly this march, you can join it here :- http://scottsdigitalcommunity.blogspot.in/2016/03/ask-aem-community-experts-deep-dive.html

 

I hope this will  help you.

Thanks and Regards

Kautuk Sahni

2 replies

kautuk_sahni
Community Manager
kautuk_sahniCommunity ManagerAccepted solution
Community Manager
March 8, 2016

Hi

Please have a look at following post for the reference:-

Link:- http://stackoverflow.com/questions/32531189/condition-statements-in-sightly

Link:- http://stackoverflow.com/questions/24550498/conditional-attributes-in-sightly-templates-aem-cq

Link:- https://docs.adobe.com/docs/en/aem/6-1/develop/sightly/expression-language.html

We have Ask the expert session to deep dive into sightly this march, you can join it here :- http://scottsdigitalcommunity.blogspot.in/2016/03/ask-aem-community-experts-deep-dive.html

 

I hope this will  help you.

Thanks and Regards

Kautuk Sahni

Kautuk Sahni
askdctmAuthor
Level 9
March 8, 2016

Hi Kautuk,

It works. Thank you for your reply.