【问题标题】:MailChimp custom template problems with drag and drop blocksMailChimp 自定义模板问题与拖放块
【发布时间】:2023-03-21 00:57:02
【问题描述】:

我正在创建自定义 MailChimp 模板,但在使用 mc:repeatable 元素时出现问题。我把它放在一个代码块上,在创建活动时在编辑器中,它工作正常,我可以生成父块的新版本并在模板中移动它,但是当我预览或发送电子邮件,从父块生成的子块位于它的父块下方,而不是在从父块生成它之后我放置它的位置......似乎有问题? (高度简化)下面的代码示例...任何人对修复有任何想法?

<!-- BLOCK A -->
<div style="width:100%" mc:repeatable="CONTENTBLOCK_A">
<p>This is block A</p>
</div>
<!-- end of BLOCK A -->

<!-- BLOCK B -->
<div style="width:100%" mc:repeatable="CONTENTBLOCK_B">
<p>This is block B</p>
</div>
<!-- end of BLOCK B -->

因此,在创建新广告系列时,如果我复制 BLOCK A 并将复制的 BLOCK A 放置在 BLOCK B 下方 - 在广告系列编辑器的预览中它看起来不错,但是当我单击以在预览模式中查看它时,或发送预览电子邮件 - 复制的 BLOCK A 位于 BLOCK B 上方和其原始生成的父 BLOCK A 元素下方...

有什么想法吗? HTML 注释(例如 )可能是问题吗?

【问题讨论】:

  • 看来,Mailchimp 希望每个块都具有相同的名称,然后使用 mc:variant 具有唯一的名称,然后它将它视为您有 1 个块,您复制它然后选择一个...
  • 进一步说明,通过为变体部分使用唯一名称,如果您输入数据,MailChimp 将保存它。因此,如果您删除一个块并重新添加它,您的内容将保留。

标签: email mailchimp


【解决方案1】:

很晚了,但我能够使用这个找到成功:

<table mc:repeatable="content" mc:variant="variant_1">
  <tr>
    <td mc:edit="section_1">
      Variant 1 Content
    </td>
  </tr>

</table>
<table mc:repeatable="content" mc:variant="variant_2">
  <tr>
    <td mc:edit="section_2">
      Variant 2 Content
    </td>
  </tr>
</table>

<table mc:repeatable="content" mc:variant="variant_3">
  <tr>
    <td mc:edit="section_3">
      Variant 3 Content
    </td>
  </tr>
</table>

更深入的解释可以在这里找到:Create Editable Content Areas with MailChimp’s Template Language

【讨论】:

    猜你喜欢
    • 2022-08-14
    • 2019-05-29
    • 2016-02-08
    • 2016-11-21
    • 2013-08-27
    • 1970-01-01
    • 1970-01-01
    • 2020-01-09
    • 2017-11-21
    相关资源
    最近更新 更多