kalenjordan / magento-twigmail
Twig email templates for Magento.
Installs: 49
Dependents: 0
Suggesters: 0
Security: 0
Stars: 5
Watchers: 1
Forks: 0
Open Issues: 0
Type:magento-module
Requires
- ajbonner/magento-composer-autoload: dev-master
- aptoma/twig-markdown: 0.2.*
- magento-hackathon/magento-composer-installer: *
- michelf/php-markdown: 1.3
- twig/twig: 1.*
This package is not auto-updated.
Last update: 2025-01-27 16:35:50 UTC
README
Still pretty experimental, but provides basic support for Twig email templates for Magento.
Installation
Add to your composer.json:
"require": {
"kalenjordan/magento-twigmail": "dev-master",
}
Usage
Then, when you're declaring a template file, just add the <renderer>twig</renderer>
node.
<template>
<email>
<clean_twigmail_test_email_template translate="label" module="cleanshare">
<label>Test Email</label>
<file>twigmail/test.html.twig</file>
<type>html</type>
<renderer>twig</renderer>
</clean_twigmail_test_email_template>
</email>
</template>
You can also enable Twig rendering for a database template by having the Template
Content start with {# twig #}
.
Testing
You can trigger a test email by going to System > Configuration > System > Twig E-Mail Templates > Send Test
To Do
-
Haven't quite worked out yet how best to allow template overrides to happen. Should be possible by just overriding the email template config node, but overriding using transactional email templates in the databse isn't possible yet.
-
I tend to like managing email copy in the code base though, so it wasn't a huge priority for me.