Hi,
kentico version: v11.0.21
We encounter an issue with macro condition within an email template somehow the content become encoded, I'm probably not the first one to end in this issue, sooo HELP :)
Here is a sample of the problem,
Template:
<div>aaa</div><br> {% if (test) { %} <div>test</div> {% } #%} <div>aaa</div><br>
Code
macroResolver.SetNamedSourceData("test", true);
Result
aaa <div>test</div> aaa
So the div between the if statement is HtmlEncoded while the rest is not, I did read about |encode(false) but this is for the internal content of a macro, here I'm out.
Any idea ?
Did you tried to set encode to false when you end if statement? Something like this:
<div>aaa</div><br> {% if (test) { %} <div>test</div> {%}|(encode)false|(identity)GlobalAdministrator%} <div>aaa</div><br>
Best regards, Dragoljub
Thanks, it is the correct answer, I guess it make sense even if it is definitely weird ^^
Please, sign in to be able to submit a new answer.