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

Submissions are now open for the 2026 Adobe Experience Maker Awards
해결됨

Styling a sentance inside targetdata used in if else statement

Avatar

Level 2

Hi All,

 

Can anyone let me know how to highlight the sentence in, if else statement while using targetdata to fetch the value from the custom schema.

 

I have added the screenshot for the reference.

Haricharan_0-1711976119870.png

In this above code i need to bold the values in targetdata.para1

@ParthaSarathy 

 

Thanks

Hariprasanth

 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

Hi @Haricharan ,

Go to source tab in delivery, and add <strong> before the start of targetData JS and </strong> after the targetData JS.

<strong><%=targetData.para %></strong>

The HTML <strong> tag is used semantically to emphasize importance, conveying meaning to both sighted and screen readers. In contrast, the <b> tag is solely for visual presentation, making text bold without conveying significance.

In Delivery HTML tab, you can see B icon. when you select this to make a text as bold, it will generate <strong><strong/> in source tab.

ParthaSarathy_0-1712132546758.png

원본 게시물의 솔루션 보기

3 답변 개

Avatar

Community Advisor

Hi @Haricharan ,

 

Please try below

 

<%if(targetData.header=="") {%>
<b><%=targetData.para %></b>

<%}
else
{ %>

<%=targetData.para2 %>
<%}%>

 

Regards,

Pravallika.

Avatar

정확한 답변 작성자:
Community Advisor

Hi @Haricharan ,

Go to source tab in delivery, and add <strong> before the start of targetData JS and </strong> after the targetData JS.

<strong><%=targetData.para %></strong>

The HTML <strong> tag is used semantically to emphasize importance, conveying meaning to both sighted and screen readers. In contrast, the <b> tag is solely for visual presentation, making text bold without conveying significance.

In Delivery HTML tab, you can see B icon. when you select this to make a text as bold, it will generate <strong><strong/> in source tab.

ParthaSarathy_0-1712132546758.png

Avatar

Administrator

Hi @Haricharan,

Were you able to resolve this query with the help of the given solutions or do you still need more help here? Do let us know. In case the given solutions were helpful, then kindly choose the one that helped you the most as the 'Correct Reply'.
Thanks!



Sukrity Wadhwa