Nested Ternary expression

Avatar

Avatar

tahir1601

Avatar

tahir1601

tahir1601

15-06-2019

Hi all,

I am trying to implement something like below in sightly

<div class="${condition1?'class1:'condition2?'class2':'condition3?'class3':''''}">

I have 3 conditions, if condition1 is not met it goes to condition2 and then condition 3 and finally else case. I am getting error doing above.

Below is general logic

if(con1)

else if(con2)

else if(con3)

else

Please let me know how to implement in correct way in sightly.

View Entire Topic

Avatar

Avatar

tahir1601

Avatar

tahir1601

tahir1601

16-06-2019

Thanks man. That worked