No description
  • PHP 91.5%
  • Scheme 8.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
MoritzSauer e117833795 Refactor DOI logic and improve form handling
- Introduced `doi_template_id` configuration for setting default DOI template ID.
- Updated logic to handle lists as arrays, ensuring proper format in form submissions.
- Removed redundant import for `Debug` to clean up the controller.
- Improved extensibility with hooks and refined form handling for better maintainability.
- Updated README to document extensibility hooks and CMS configuration enhancements.
2026-01-20 10:36:20 +01:00
_config Add localized Brevo newsletter registration page with form integration 2026-01-16 11:31:21 +01:00
lang Add localized Brevo newsletter registration page with form integration 2026-01-16 11:31:21 +01:00
src Refactor DOI logic and improve form handling 2026-01-20 10:36:20 +01:00
templates Add DOI template ID field and refactor DOI handling logic 2026-01-16 13:16:21 +01:00
_config.php init 2026-01-16 11:18:01 +01:00
composer.json Add localized Brevo newsletter registration page with form integration 2026-01-16 11:31:21 +01:00
README.md Refactor DOI logic and improve form handling 2026-01-20 10:36:20 +01:00

Brevo Newsletter Registration for SilverStripe

Adds a page type with a Newsletter Registration Form that integrates with Brevo (formerly Sendinblue).

Features

  • Custom Newsletter Registration Page.
  • Selectable Brevo lists for subscription.
  • Support for Double Opt-In (DOI) via Brevo.
  • Configurable redirect pages for success and DOI hints.
  • Fully localized (English and German).
  • Extensible via SilverStripe Extension system.

Requirements

  • SilverStripe CMS ^5
  • getbrevo/brevo-php ^2.0

Installation

composer require moritz-sauer-13/brevo-newsletter-registration

After installation, run a dev/build?flush=all.

Configuration

The registration page can be configured via the CMS (Brevo and Links tabs). Here you can set the API Key, select Brevo lists, and define the DOI Template ID.

Usage

  1. Create a new page of type "Newsletter Anmeldung" in the CMS.
  2. Enter your Brevo API Key in the "Brevo" tab.
  3. Select one or more lists after the API key is validated.
  4. Configure redirect pages in the "Links" tab.

Extensibility

Available hooks for BrevoNewsletterRegistrationPageController:

  • updateNewsletterRegistrationFields($fields)
  • updateNewsletterRegistrationRequiredFields($requiredFields)
  • updateNewsletterRegistrationData($data)
  • updateNewsletterRegistrationContactAttributes($contactAttributes, $data)
  • updateCreateDoiContact($createContact, $data)
  • onAfterNewsletterRegistration($data, $form)

License

MIT