这是我的测试代码,用于判断条件是否不适用于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>
答案 0 :(得分:0)
您应该将数据原始放置并尝试
<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>