<p> ${atcList.first || atcList.last} ? <b>Code ${atc.code}</b> : Code ${atc.code}</p>
I need that when the value is true, the result is bold, and when the value is false, another result is displayed, what is the error in my line? or, how it is working in sightly?
Now is : true ? Code 2 : Code 2
The ternary statement needs to be all inside the HTL/Sightly expression, you cannot mix it with HTML.
The HTL/Sightly way to do it is to use conditional
data-sly-unwrapfor the bold tag: