2017 © Pedro Peláez
 

silverstripe-module silverstripe-mailchimp

Adds mailchimp integration to SilverStripe, eventually inside a widget

image

zirak/silverstripe-mailchimp

Adds mailchimp integration to SilverStripe, eventually inside a widget

  • Tuesday, May 16, 2017
  • by g4b0
  • Repository
  • 2 Watchers
  • 2 Stars
  • 75 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 6 Forks
  • 1 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

silverstripe-mailchimp

MailChimp subscription form, (*1)

The form could be injected into a widget, or used inside a page through the MailChimp extension, (*2)

Maintainer Contact

Gabriele Brosulo [gabriele.brosulo (at) zirak (dot) it], (*3)

Features

  • Subscription widget form
  • Static function callable from outside

Requirements

  • Silverstripe framework 3.1.*
  • Silverstripe cms 3.1.*

Suggestions

  • silverstripe/widget
  • zirak/widget-pages-extension

Install

Install it through composer:, (*4)

    composer require zirak/silverstripe-mailchimp

Using in a page

Extend the Page class (or whatever class you want to use) whit the MailChimp extension:, (*5)

---
Name: mailchimp-extensions
---
Page:
  extensions:
    - MailChimp

Then render the $McSubscribeForm variable inside your template:, (*6)

<% include SideBar %>
<div class="content-container unit size3of4 lastUnit">
    <article>
        <h1>$Title</h1>
        <div class="content">$Content</div>
    </article>
        $Form
        $PageComments
        $McSubscribeForm
</div>

Using inside a widget

Simply use the MailChimpSubscribe widget as usual documentation here, (*7)

Using inside a widget with widget-pages-extension

Define the widgetareas in your pages, like stated in widget-pages-extension module After that define which widget are allowed for your pages, in particular MailChimpSubscribe., (*8)

For example your Page.php will become, (*9)

class Page extends SiteTree {

    private static $db = array(
    );
    private static $has_one = array(
            'SideBar' => 'WidgetArea'
    );
    private static $allowed_widgets = array(
            'MailChimpSubscribe'
    );

}

Run a /dev/build?flush=all and enjoy your widgets. Due to a known issue in widget-pages-extension you have to save each page you will need to put the widgets on. For more information about how to use the widgets please see the widget-pages-extension module documentations, (*10)

Usage

  • Configure your MailChimp APIKEY and ListID
  • Enable the widget
  • Play with the mailchimp.yml config file in your mysite folder, in conjunction with the MailChimp configurations. Follow a sample mailchimp.yml
---
Name: mailchimp
---
MailChimpController:
  #apikey - see http://admin.mailchimp.com/account/api
  apikey: 'afe564e2dbbeb74f392de68f927ac326ef4-us6'
  # A List Id to run examples against. use lists() to view all
  # Also, login to MC account, go to List, then List Tools, and look for the List ID entry
  listid: '8e5f26f915'
  redirect: true
  redirect_ok: 'reg-ok/'
  redirect_ko: 'reg-ko/'
  country: true
  topics: true
  topicsArr: ['Web development', 'Sysadmin', 'PHP', 'Javascript', 'HTML & CSS']
  otherTopic: true

The Versions

16/05 2017

dev-master

9999999-dev

Adds mailchimp integration to SilverStripe, eventually inside a widget

  Sources   Download

The Requires

 

by Gabriele Brosulo - Zirak

newsletter mailchimp widget silverstripe mailinglist

01/10 2015

2.1

2.1.0.0

Adds mailchimp integration to SilverStripe, eventually inside a widget

  Sources   Download

The Requires

 

by Gabriele Brosulo - Zirak

newsletter mailchimp widget silverstripe mailinglist

01/10 2015

2.0

2.0.0.0

Adds mailchimp integration to SilverStripe, eventually inside a widget

  Sources   Download

The Requires

 

by Gabriele Brosulo - Zirak

newsletter mailchimp widget silverstripe mailinglist

12/11 2014

1.3

1.3.0.0

Adds mailchimp integration to SilverStripe, eventually inside a widget

  Sources   Download

The Requires

 

by Gabriele Brosulo - Zirak

newsletter mailchimp widget silverstripe mailinglist

12/11 2014

1.2

1.2.0.0

Adds mailchimp integration to SilverStripe, eventually inside a widget

  Sources   Download

The Requires

 

by Gabriele Brosulo - Zirak

newsletter mailchimp widget silverstripe mailinglist

12/11 2014

1.1

1.1.0.0

Adds mailchimp integration to SilverStripe, eventually inside a widget

  Sources   Download

The Requires

 

by Gabriele Brosulo - Zirak

newsletter mailchimp widget silverstripe mailinglist

12/11 2014

1.0

1.0.0.0

Adds mailchimp integration to SilverStripe, eventually inside a widget

  Sources   Download

The Requires

 

by Gabriele Brosulo - Zirak

newsletter mailchimp widget silverstripe mailinglist