我在电子邮件中有以下 RPL 代码:
<#data ALERTS as alerts>
<#filter USER_ID1=CONTACTS_LIST.CUSTOMER_ID_1>
<#fields AD_ID_LIST1>
<#assign cellCount = 0>
<#list alerts.AD_ID_LIST1?split(r'\s*,\s*', 'r') as idString>
<#data AD_TABLE as adtable>
<#filter AD_ID="${idString}">
<#fields AD_ID TITLE IMAGES DESCRIPTION PRICE_AMOUNT PRICE_TYPE CATEGORY_ID1 AD_STATE>
<#if idstring?? && adtable.AD_STATE='ACTIVE'>
<#assign cellCount = cellCount + 1>
<#if cellCount % 2 == 1 && idString_has_next == false>
<!-- INCLUDE SINGLE -->
<#elseif cellCount % 2 == 1 && idString_has_next == true>
<!-- Include LEFT -->
<#else>
<!-- INCLUDE RIGHT -->
</#if>
</#if></#data></#list></#data>
我需要做的是在确定没有要显示的广告 id 后,如果 cellCount = 0 则让电子邮件跳过发送给用户(无论状态是否处于活动状态或它们已从表中删除。
有谁知道如何做到这一点 ?