ssch / typo3-mjml
MJML for TYPO3
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
Type:typo3-cms-extension
Requires
- php: >=7.2.0 <8.0
- ext-json: *
- typo3/cms-core: ^9.5 || ^10.3
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.0
- phpspec/prophecy-phpunit: ^1.1
- typo3/cms-tstemplate: ^9.5 || ^10.3
- typo3/minimal: ^9.5 || ^10.3
- typo3/testing-framework: ^4.0 || ^6.2
Replaces
- typo3-ter/typo3-mjml: dev-master
This package is auto-updated.
Last update: 2022-06-29 01:43:57 UTC
README
Use MJML to ease the pain of generating responsive emails
https://mjml.io integration for TYPO3 with FLUID-Helper.
Installation
Over composer:
composer require ssch/typo3-mjml
NPM
Npm is needed for the conversion of the MJML file to HTML
Usage in Fluid
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" xmlns:m="http://typo3.org/ns/Ssch/Typo3Mjml/ViewHelpers" data-namespace-typo3-fluid="true"> <m:mjmlToHtml> <mjml> <mj-body background-color="#F4F4F4" color="#55575d" font-family="Arial, sans-serif"> <mj-section background-color="#000000" background-repeat="no-repeat" text-align="center" vertical-align="top"> <mj-column> <mj-image align="center" border="none" padding-bottom="30px" padding="10px 25px" src="{f:uri.image(src: 'image.png')}" target="_blank" title="" width="180px"></mj-image> <mj-text align="left" color="#55575d" font-family="Arial, sans-serif" font-size="13px" line-height="22px" padding-bottom="0px" padding-top="0px" padding="10px 25px"> <p style="line-height: 18px; margin: 10px 0; text-align: center;font-size:14px;color:#ffffff;font-family:'Times New Roman',Helvetica,Arial,sans-serif">WOMEN | MEN | KIDS</p> </mj-text> </mj-column> </mj-section> </mj-body> </mjml> </m:mjmlToHtml>
Configuration
You can either use the BinaryRenderer (node is needed) or the APIRenderer (https://mjml.io/api). This is configured via the Extension Configuration aka ext_conf_template.txt