Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

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

Avatar

Level 9

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.

desktop_exl_promo_600x100_weknowyou.png

1 Accepted Solution

Avatar

Correct answer by
Administrator

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

View solution in original post

2 Replies

Avatar

Correct answer by
Administrator

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

Avatar

Level 9

Hi Kautuk,

It works. Thank you for your reply.