Skip to main content

mailchimp integration for Plone.

Project description

redturtle.monkey

https://travis-ci.org/RedTurtle/redturtle.monkey.png?branch=master

Another MailChimp integration for Plone. We did have a reason to not use collective.mailchimp nor collective.chimpfeed (although we have reused/shared some of the concepts you can find there). Simply our use case is different (call it much simpler :)

Use case

Let say you want to configurate MailChimp campaign in Plone (including Plone content of course) and manually decide when to push it to chimp cloud service. This is what the redturtle.monkey actually do. You can:

  • create multiple campaign configurations

  • each configuration:

    • can contain different MailChimp API Keys (or you can use global ones)

    • contain different Plone items to be used as campaign content

    • can have a MailChimp template and subscribers list

Sections/Slots

What makes redturtle.monkey flexible is the ability to register custom MailChimp template sections (slots) and decide how to render them. A section is subscriber adapter that you can register with ZCML like that:

<subscriber provides="redturtle.monkey.interfaces.IMailchimpSlot"
            factory=".generic.Body" />

Then the factory is simple:

from redturtle.monkey.slots import Slot

class Body(Slot):
   name = u'body'

The name will be used later by MailChimp so it should correspondent to your mc:edit tag.

Last thing is to register content renderer for your new slot:

<adapter for="* *" factory=".generic.BodyRenderer" name="body"/>

but if you would like to render let say events differently you can do it:

<adapter for="Products.ATContentTypes.interfaces.IATEvent *"
         factory=".event.BodyRenderer" name="body"/>

It will then look like that:

from Products.Five.browser.pagetemplatefile import ViewPageTemplateFile
from redturtle.monkey.slots import SlotRenderer

class BodyRenderer(SlotRenderer):
    template = ViewPageTemplateFile("generic_body.pt")

Changelog

1.2 (2013-03-26)

  • subscribe portlet now supports multi campaigns [amleczko]

1.1 (2013-03-12)

  • translation fixes [amleczko]

  • portlet hidden for anonymous [amleczko]

  • make sure only published content is used [amleczko]

1.0 (2013-03-05)

  • Initial release

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

redturtle.monkey-1.2.zip (63.4 kB view details)

Uploaded Source

File details

Details for the file redturtle.monkey-1.2.zip.

File metadata

  • Download URL: redturtle.monkey-1.2.zip
  • Upload date:
  • Size: 63.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for redturtle.monkey-1.2.zip
Algorithm Hash digest
SHA256 32d6507f06aa965a167835022525f54085dfcbc343d08887d836f26065bf4284
MD5 b9e149df1d7e8160b3be6d7f9c5e0907
BLAKE2b-256 c882bdddc1a2656e9ba884c68d938ca64fa94768a7110063e7bbf3374a807581

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page