assoconnect/mjml-bundle

MJML template support for Twig template engine

Installs: 1 158

Dependents: 0

Suggesters: 0

Stars: 4

Watchers: 2

Forks: 0

Open Issues: 0

Type:symfony-bundle

v1.2.0 2019-05-03 13:17 UTC

README

Build Status Coverage Status Quality Gate Status

This Symfony 4 bundle provides the integration of the MJML command line tool to create responsive emails as Twig templates.

It requires the installation of the MJML command line tools running with NodeJS.

It also supports custom HTML tags to avoid duplicating long MJML tags with a lot of options to ensure consistency amongst your templates.

Twig expressions can be used within the templates.

As compiling MJML code to HTML code is slow, this bundle follows this process:

  • you write MJML templates with Twig expressions
  • during cache warmup, these templates are compiled to HTML and Twig expressions are not resolved
  • you use the compiled HTML templates with Twig and all the variables you need with you favorite email sending system

How to use