how to check option condition in email template script
Hi team,
I have to check if the option value is 0 my email template prints "Hi" and if the option value is 1 it prints "Bye". this scenario I want to be achieve in an email template not using a Personalization block.
My code below:
<%
var A = "<%@ include option='test' %>
if (A == '0')
{
<p><b><span style="font-family: 'Times New Roman'; font-size: 16px;">hi</span></b></p>
}
else
{
<p><b><span style="font-family: 'Times New Roman'; font-size: 16px;">bye</span></b></p>
}
%>
error:
01/18/2024 3:00:53 AM Failed Unreachable xxx Error while compiling script 'content htmlContent' line 8: illegal XML character (line='var A = <%@ include option='test' %>;\ ' token='%@ include option='test' %>;\ '). SCR-160032 Javascript: error while compiling script 'content htmlContent'. JST-310007 Unable to compile script (content htmlContent).
@parthasarathy please help on this