Expand my Community achievements bar.

Adobe Campaign User Groups are live now. Join our Adobe Campaign User Groups and connect with your local leaders!
SOLVED

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 Accepted Solution

Avatar

Correct answer by
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

View solution in original post

3 Replies

Avatar

Community Advisor

Hi @Haricharan ,

 

Please try below

 

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

<%}
else
{ %>

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

 

Regards,

Pravallika.

Avatar

Correct answer by
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