我在这里找到了答案:
https://mailchimp.com/developer/transactional/docs/templates-dynamic-content/
这是来自页面的信息:
条件合并标签支持传统的 IF、ELSE 和 ELSEIF 逻辑以及 IFNOT 否定条件。
仅当条件评估为真时才使用 IF 条件显示内容。
*|IF:MERGE|*
content to display if a value for MERGE is provided
*|END:IF|*
*|IF:MERGE=x|*
content to display if the value for MERGE is x
*|END:IF|*
当使用 |IF:MERGE=x| 之类的条件时,如果没有提供 MERGE 的值,则条件将评估为 false。
使用 IF 和 ELSE 条件在条件为真时显示内容,但在条件评估为假时显示替代内容。
*|IF:MERGE|*
content to display
*|ELSE:|*
alternative content
*|END:IF|*
ELSEIF 条件
使用 ELSEIF 显示几个可能的选项之一。仅显示第一个条件为 true 的内容,其他条件将被跳过。
*|IF:MERGE=x|*
<p>content to display if the value for MERGE is x</p>
*|ELSEIF:MERGE=y|*
<p>content to display if the value for MERGE is not x, but is y</p>
*|ELSEIF:MERGE=z|*
<p>content to display if the value for MERGE is not x or y, but is z</p>
*|ELSE:|*
<p>alternate content to display if the value for MERGE is not x, y, or z</p>
*|END:IF|*
嵌套条件
*|IF:MERGE1=x|*
*|IF:MERGE2=y|*
<div mc:edit="main">
<p>content to display if both conditions are true</p>
</div>
*|END:IF|*
*|END:IF|*
否定条件
*|IF:MERGE!=x|*
content to display if the value for MERGE is not x
*|ELSE:|*
content to display if the value for MERGE is x
*|END:IF|*
*|IFNOT:MERGE|*
content to display if MERGE is not provided
*|ELSE:|*
content to display if MERGE is provided
*|END:IF|*
在我的情况下使用
*|IF:UPDATE_PROFILE|*
<p>IMPORTANT NOTE: *|LAYOUTYEAR|*
available for review at: http://www.somesite.org/SomePage.</p>
*|ELSE:|*
<p>
<a href="http://www.somesite.org/SomePage" target="_blank">Click here</a>
to view the detailed specs.
</p>
*|END:IF|*