Expandir minha barra de realizações na Comunidade.

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

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 Solução aceita

Avatar

Resposta correta de
Community Advisor

Hi @Javi_Landa ,

Modify your condition as below,

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

Insert content here

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

Ver solução na publicação original

1 Resposta

Avatar

Resposta correta de
Community Advisor

Hi @Javi_Landa ,

Modify your condition as below,

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

Insert content here

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