0

Here is my test code for if condition which is not working of version mjml 3.3.5.

<mjml>
  <mj-body>
    <mj-image width="100px" src="/assets/img/logo-small.png"></mj-image>
    <mj-divider border-color="#F45E43"></mj-divider>
    <mj-text font-size="20px" color="#F45E43" font-family="helvetica">Hello World</mj-text>
    {%if "a" == "a"  %}
        This is a text    
    {% endif %} 
            </mj-body>
</mjml>
Mansi
  • 21
  • 2
  • 8

1 Answers1

0

you should place your data in a raw and try this

<mjml>
  <mj-body>
    <mj-raw>{% if "a" == "a" %}</mj-raw>
    <mj-section>
      <mj-column>
        <mj-text>{{data}}</mj-text>
      </mj-column>
    </mj-section>
    <mj-raw>{% endif %}</mj-raw>
  </mj-body>
</mjml>