Iterating over collection in mailchimp template via API

不打扰是莪最后的温柔 提交于 2019-12-05 18:05:07
CarpeNoctumDC

Short answer: No

I just answered this more in depth on another S.O. question

Mailchimp API and Repeatable Sections

Short answer why it doesn't work: The repeatable sections are available with the mailchimp WYSIWYG editor (Custom CKEdit) .. It uses the repeatable tag (mc:repeatable) to duplicate the content.

From the standpoint of the API, the content / sections available are only those on the original template... Even if you edit and/or repeat a section and pull the campaignTemplateContent method it will return the content of the original template.. (Because it is the base template being used)...

The mc:edit, mc:repeatable, and mc:hidable fields all are part of their custom editor...

The mc:edit field is also used to determine the content sections... (This is why the api calls return the FULL html contents of the tagged sections...)

Your best bet is to generate the template on the fly and then upload it using the API... That or if you have a static number of products you are including you could set a template and then just fill in the sections (if you setup the BASE template with the sections, each section will have a custom mc:edit identifier that can be used to populate the sections..)

Each section will be prepended with an identifuer... e.g. 'repeated_content00' 'repeated_content01'... But again, this is in the base template (not campaign edited template)...

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!