ssch/typo3-mjml

此包已被废弃,不再维护。没有建议的替代包。

MJML for TYPO3

安装: 1

依赖: 0

建议者: 0

安全: 0

星标: 1

关注者: 1

分支: 0

开放问题: 0

类型:typo3-cms-extension

dev-master / 1.0.0.x-dev 2020-04-08 20:27 UTC

This package is auto-updated.

Last update: 2022-06-29 01:43:57 UTC


README

Build Status Coverage Status Downloads

使用MJML减轻生成响应式邮件的痛苦

https://mjml.io 集成到 TYPO3 中,使用 FLUID-Helper。

安装

通过composer安装

composer require ssch/typo3-mjml

NPM

需要NPM将MJML文件转换为HTML

在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&nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; MEN&nbsp; &nbsp; &nbsp; &nbsp;| &nbsp; &nbsp; &nbsp; KIDS</p>
                         </mj-text>
                </mj-column>
            </mj-section>
        </mj-body>
    </mjml>
</m:mjmlToHtml>

配置

您可以使用BinaryRenderer(需要node)或APIRenderer(https://mjml.io/api)。这是通过扩展配置即ext_conf_template.txt来配置的

MJML 文档

https://mjml.io/documentation/