By making use of mailchimp names instead of ids it's possible to code-customizations for special mailchimp lists without having to refer to an possible changing id - thus that way customizations are much more stable.
Attached patch fixes the list module to use the machine name for block deltas, form ids and inside $form. What allows stuff like
* configure a mailchimp block via context module and export that
* theme blocks by name using the block template suggestions (module, delta)
* theme a signup form specifically for a mailchimp list by name
* alter signup forms by name
...
I think that should cover the most important places where it's very useful to have names.
Comment | File | Size | Author |
---|---|---|---|
mailchimp_names.patch | 2.38 KB | fago | |
Comments
Comment #1
fagoComment #2
fagoI'm using this patch quite a while, seems to work well and helps a lot when working with the module. Any updates, reviews?
Comment #3
levelos CreditAttribution: levelos commented@fago, sorry, not ignoring this one. Seems like a great patch and a good improvement. Wrapping up a few other big projects at the moment, but we have a big push for MC planned soon and I'll make this one of the first commits.
Comment #4
emptyvoid CreditAttribution: emptyvoid commentedAny update on the patch and or status of commits to the dev branch?
Comment #5
levelos CreditAttribution: levelos commentedComment #7
bvanmeurs CreditAttribution: bvanmeurs commentedThis is causing a serious issue when updating from 2.4. See http://drupal.org/node/1635828.
Did you consider what to do when updating blocks that have been configured using the list id block delta??
Comment #8
levelos CreditAttribution: levelos commentedThere is now a hook_update_N() to change the block deltas.
Comment #9
bvanmeurs CreditAttribution: bvanmeurs commentedYou are awesome! I will try it tomorrow.
Thanks for your work. Its very much appreciated.