dev-master
9999999-devGenerate emailings with twig and csv
MIT
The Requires
The Development Requires
Wallogit.com
2017 © Pedro PelĂĄez
Generate emailings with twig and csv
With Email-Makr you design only one twig template and a csv with translated block. Then Email-Makr will generate all variants for your email., (*1)
Email-Makr takes as first argument a path to a twig template. It could be any valid twig template. For exemple:, (*2)
<li>lang : {{ lang }}</li>
<li>var1 : {{ var1 }}</li>
<li>var1 : {{ var2 }}</li>
Email-Makr takes as second argument a path to a csv file. The csv file should contains a least :, (*3)
| var1 | var2 | |
| en | value en 1 | value en 2 |
| fr | value fr 1 | value fr 2 |
See exemple for more information., (*4)
emailmakr template.html.twig datas.csv, (*5)
Options:, (*6)
--output-directory, default: ./emailings/
--output-format, default: "mail_LANG.html. LANG is a placeholder.
It will be remplaced by the current languageOuput looks for:, (*7)
$ ./emailmakr.php generate-email index.html.twig datas.csv Generated "/var/www/dev/sensio/emailings/exemple/emailings/mail_fr.html" Generated "/var/www/dev/sensio/emailings/exemple/emailings/mail_en.html" Generated "/var/www/dev/sensio/emailings/exemple/emailings/mail_es.html" Generated "/var/www/dev/sensio/emailings/exemple/emailings/mail_it.html" Finished
Downlaod email-makr
and run it: php email-makr., (*8)
composer create-project lyrixx/email-makr email-makr, (*9)
Generate emailings with twig and csv
MIT