Giter VIP home page Giter VIP logo

mosaico-templating-tool's Issues

Example in documentation re: colour variable

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.

  1. In the example, there are three vars, right? brand_color, name, text.

  2. 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} ?

  3. 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'
),
...

Using the output?

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.

  1. Do they need to be cut and pasted into CiviCRM templates?

  2. 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?
    2018-10-18_11-08-04

  3. 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??
    2018-10-18_11-07-28
    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!!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.