Expand my Community achievements bar.

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

Dynamically render template based up on the priority of the div blocks

Avatar

Level 6

Hi everyone

 

I have a requirement where, based on the value of targetdata.column1 (e.g., value1), the HTML email template should render only the top 3 blocks.

To provide more context:

The HTML template contains multiple rows that are arranged in order of priority, such as:

  • Row 1
  • Row 2
  • Row 3
  • Row4

If targetdata.column1 equals value1, eligible only for Row 1 and Row 2 should be rendered in the email template. How can I ensure that only these specific rows are displayed?

 

Thank you in advance

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @rvnth ,

You can define using If conditional element in HTML with || (or)

Example,

<% if ( targetData.column1 == 'value1' ) { %>
ROW-1
<% } %>
<% if ( targetData.column1 == 'value1'  || targetData.column1 == 'value2' ) { %>
ROW-2
<% } %>
<% if ( targetData.column1 == 'value2'  || targetData.column1 == 'value3' ) { %>
ROW-3
<% } %>

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @rvnth ,

You can define using If conditional element in HTML with || (or)

Example,

<% if ( targetData.column1 == 'value1' ) { %>
ROW-1
<% } %>
<% if ( targetData.column1 == 'value1'  || targetData.column1 == 'value2' ) { %>
ROW-2
<% } %>
<% if ( targetData.column1 == 'value2'  || targetData.column1 == 'value3' ) { %>
ROW-3
<% } %>