$field='html_main';
$value='<h1>some pretty NEW html content</h1>';
$retval = $api->campaignUpdate($cid, $field, $value);
and that throws an error - Code=312 Msg=Can not update unknown option "html_main"
How should this be done?
Murray
--
Murray R. Summers
Great Web Sights
610-469-9715
msum...@great-web-sights.com
http://www.great-web-sights.com
$value=array('html_MAIN'=>'<h1>some pretty NEW html content</h1>');
jesse
On Dec 21, 8:55 am, "Murray R. Summers" <msumm...@great-web-
sights.com> wrote:
> I've created a campaign and saved it. Now I want to update the MAIN
> content region with some new HTML. I've tried using -
>
> $field='html_main';
> $value='<h1>some pretty NEW html content</h1>';
> $retval = $api->campaignUpdate($cid, $field, $value);
>
> and that throws an error - Code=312 Msg=Can not update unknown option
> "html_main"
>
> How should this be done?
>
> Murray
>
> --
> Murray R. Summers
> Great Web Sights
> 610-469-9715
> msumm...@great-web-sights.comhttp://www.great-web-sights.com
I guess I can try to make it more clear that the general options are
passed by name and the additional parameters are passed as the param
name and then normal value, though the second set of example code for
campaignUpdate does show that (absplit options). The campaignCreate
docs also list the typical names for the content sections. The names
are actually defined by the template in use as we discussed a while
ago here:
http://groups.google.com/group/mailchimp-api-discuss/browse_thread/thread/2fc50342e5a3544e
jesse
On Dec 21, 1:55 pm, "Murray R. Summers" <msumm...@great-web-
sights.com> wrote:
> And by the way - how would I know that the field value is 'content'? When
> I do campaignContent(), I don't see those field names.... What other field
> names are there?
>
> Murray
>
> --
> Murray R. Summers
> Great Web Sights
> 610-469-9715
> msumm...@great-web-sights.comhttp://www.great-web-sights.com
>
> ----------------------------------------
>
> From: "jesse" <je...@mailchimp.com>
> Sent: Monday, December 21, 2009 1:49 PM
> To: "MailChimp API Discuss" <mailchimp-...@googlegroups.com>
> Subject: Re: Updating a saved campaign
>
> The field value should be "content", and the value field should be:
>
> $value=array('html_MAIN'=>'
> some pretty NEW html content');
>
> jesse
>
> On Dec 21, 8:55 am, "Murray R. Summers" some pretty NEW html content';
jesse
On Dec 22, 7:44 am, "Murray R. Summers" <msumm...@great-web-
> msumm...@great-web-sights.comhttp://www.great-web-sights.com
>
> ----------------------------------------
>
> From: "jesse" <je...@mailchimp.com>
> Sent: Monday, December 21, 2009 2:05 PM
> To: "MailChimp API Discuss" <mailchimp-...@googlegroups.com>
> Subject: Re: Updating a saved campaign
>
> The options for campaignUpdate follow the same setup used by
> campaignCreate:http://www.mailchimp.com/api/1.2/campaigncreate.func.php
>
> I guess I can try to make it more clear that the general options are
> passed by name and the additional parameters are passed as the param
> name and then normal value, though the second set of example code for
> campaignUpdate does show that (absplit options). The campaignCreate
> docs also list the typical names for the content sections. The names
> are actually defined by the template in use as we discussed a while
> ago here:http://groups.google.com/group/mailchimp-api-discuss/browse_thread/th...
> c50342e5a3544e
>
> jesse
>
> On Dec 21, 1:55 pm, "Murray R. Summers"
>
>
>
";print_r($tmpl['sections']);echo"
$cid = "XXX";
$field = "content";
$value = array('html_MAIN'=>'blah, blah', 'html_HEADER'=>'blah,
blah');
$api->campaignUpdate($cid, $field, $value);
That help?
jesse
On Dec 22, 11:02 am, "Murray R. Summers" <msumm...@great-web-
sights.com> wrote:
> Believe me, I read your last post and the associated link very carefully.
> To summarize:
>
> 1. To work correctly with the campaignUpdate() method, I had to use a
> field name of "content", as advised by you..
> 2. You mentioned that these field names are given visibility by using the
> campaignTemplates() method.
> 3. When I use the campaignTemplates() method for that particular template,
> I only see the field names listed below contained in the 'layout' element
> of the $retval array (header, main, sidecolumn, footer). There is no
> mention of a field name of 'content'.
>
> And once again, if I want to programmatically update a draft campaign that
> is based on a template,how do I know what field names to use for this
> campaignUpdate() method? I'm not trying to be thick here! :)
>
> Thanks,
>
> Murray
>
> --
> Murray R. Summers
> Great Web Sights
> 610-469-9715
> msumm...@great-web-sights.comhttp://www.great-web-sights.com
>
> ----------------------------------------
>
> From: "jesse" <je...@mailchimp.com>
> Sent: Tuesday, December 22, 2009 10:51 AM
> To: "MailChimp API Discuss" <mailchimp-...@googlegroups.com>
> Subject: Re: Updating a saved campaign
>
> That last thread I linked covered this - section names are defined per
> template. Many have similar section names, but some will not.
>
> jesse
>
> On Dec 22, 7:44 am, "Murray R. Summers"