babu-cat / mosaico-templating-tool Goto Github PK
View Code? Open in Web Editor NEWLicense: GNU General Public License v3.0
License: GNU General Public License v3.0
Thanks for putting this together. I'm evaluating whether this will be useful for a client with two languages.
The example is very helpful, and the instructions are very clear for the most part. However, I'm still a little confused by the example and would be happy to submit a PR to clarify it if I understood it better.
In the example, there are three vars, right? brand_color, name, text.
CiviCRM should be used to generate the name somehow, rather than having it generated once per template, if I understand correctly. However, I'm used to seeing {contact.display_name} as a token - why are you using {{ name }} rather than a token like {contact.display_name} ?
I love the config directory and file tree - it's very clear. But from the example text I'm not sure why there are not six files after the script is run, like this:
dist
└── template1
├── color1
│ └── template1-en-color1.html
│ └── template1-es-color1.htm
├── color2
│ ├── template1-en-color2.html
│ └── template1-es-color2.html
└── color3
└── template1-en-color3.html
└── template1-es-color3.html
I think in section 3 you start explaining how to override the languages to be generated by adding an array in the relevant vars file. So in order to make the example work, am I right in supposing that the following needs to be added to the config/template1/vars/color1.php and config/template1/vars/color3.php files:
...
'langs' => array(
'en'
),
...
I'm wondering if the documentation could have an additional section explaining what to do after the script is run in order to make use of the templates generated.
Do they need to be cut and pasted into CiviCRM templates?
When mailing with CiviCRM, how should one configure the email and recipients? For example, should one create a mailing group based on their language preference (and color choice, to go with example in docs), and then create one mailing for each generated template?
When doing a scheduled reminder, if one specified as the Communication Language Follow recipient preferred language, would it somehow pick up templates based on language??
Or to make use of this script from you, should one similarly create one reminder for each template produced by the script, and use the Limit or Add Recipients to exclude people based on the language preference (and whether I want to send them one color or another).
Again, if you can set me straight, then I'll update the docs with PRs.
Thanks!!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.