내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

ternary operator AEM

Avatar

Level 7

Hi Team, 

I want to print a value (which is getting from the dialog) inside a ternary operator.

 

I'm able to use ternary operator like below and it works fine.

<a href="#" class="${properties.openinnewwindow ? 'nonunderline' : ''}">link</a>

 

But when I put it like below it is not working. Adding a value from the dialog ${properties.name}.

<a href="#" class="${properties.openinnewwindow ? '${properties.name}' : ''}">link</a>

 

Any suggestions would be appreciated.

Thank you.

 

 @Vijayalakshmi_S 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 10

Hi @JakeCham,

Small correction in the usage. 

It should be 

<a href="#" class="${properties.openinnewwindow ? properties.name : 'Default class'}">link</a>

원본 게시물의 솔루션 보기

2 답변 개

Avatar

정확한 답변 작성자:
Level 10

Hi @JakeCham,

Small correction in the usage. 

It should be 

<a href="#" class="${properties.openinnewwindow ? properties.name : 'Default class'}">link</a>

Avatar

Level 7

Thanks a lot for the fast replying. Really appreciate it.