Expand my Community achievements bar.

Announcing the launch of new sub-community for Campaign Web UI to cater specifically to the needs of Campaign Web UI users!
SOLVED

Error while creating conditional content in HTML of the delivery template

Avatar

Level 2

Hi there!

 

I am trying to create  conditional content based on the segment code i have created in my workflow:

 

Javi_Landa_0-1697022741407.png

But when i try to send the delivery, this error happens:

JST-310000 Error while compiling script 'content htmlContent' line 4: invalid XML name (line=' if ( <targetData.segmentCode> == <"info"> ) { document.writeraw("info"); ' token='"info"> ) { document.writeraw("info"); ').

 

Could anyone help me?

 

Thank you team

 

 

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Javi_Landa ,

Modify your condition as below,

<% if ( targetData.segmentCode == "info" ) { %>

Insert content here

<% } else { %>
Insert content here
<% } %>

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Javi_Landa ,

Modify your condition as below,

<% if ( targetData.segmentCode == "info" ) { %>

Insert content here

<% } else { %>
Insert content here
<% } %>