Yes I understand the difference between campaigns and templates.
And yes I've finally was able to get things working (almost):
So my template looks like this:
<html>
<body>
<ul mc:repeatable="product">
<li mc:edit="product_name">product_name</li>
</ul>
</body>
</html>
And after playing with firebug in template editor and using provided
thread I've finally understood the cryptic naming pattern. So for the
following template to fill it with data I need to pass this hash
{ # content for campaignCreate method
"html_repeat_1:0:product_name" => "PRODUCT TITLE 1",
"html_repeat_1:1:product_name" => "PRODUCT TITLE 2",
"html_repeat_1:2:product_name" => "PRODUCT TITLE 3"
}
But now I have problem with naming - repeat_1 doesn't look like a good
name so I've decided to name it "product" but it still named repeat_1
and when I do templateInfo(templateId)["source"] call the
mc:repeatable name is removed so it looks like this
<ul mc:repeatable>
<li mc:edit="product_name"></li>
</ul>
The problem with that is that if I add another repeatable section
before this section the repeat_N numbering will change and all things
will break up. And furthermore it seems that your internal things are
breaking in this case. Maybe this is kind of bug?
Steps:
1. I have one repeatable in a template
2. I go to My Templates -> Select template -> Edit
3. I add item
4. I save it
5. I go to My Template -> Select template -> Code
6. I add one more repeatable section before existing one
7. When I save and go again to template edit page I'll have first
repeatable section repeated twice instead of second one
Screencast:
http://screencast.com/t/OOKdvdfTgh
Thanks!
On Aug 4, 2:59 pm, jesse <
je...@mailchimp.com> wrote:
> It is the same - the way I linked is how you can add repeatable
> content to a campaign. And yes, you should also name all of your
> repeatable sections for clarity.
>
> Maybe you just don't understand the difference between a template and
> a campaign?
>
>
http://kb.mailchimp.com/article/whats-the-difference-between-a-templa...