Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass variables to templates #451

Closed
matass opened this issue Nov 28, 2016 · 2 comments
Closed

Pass variables to templates #451

matass opened this issue Nov 28, 2016 · 2 comments

Comments

@matass
Copy link

matass commented Nov 28, 2016

It's a feature request. it would be super cool if we could pass variables to included templates.
Something ike this <mj-include path="/src/components/signature" track_id="1" />

@iRyusa
Copy link
Member

iRyusa commented Nov 28, 2016

Hi @matassim

This is something has been asked before and we don't want to variable inside mj-include. If we allow variables, people will ask conditionnal structures and MJML will become a templating language rather than a markup language.

My best advice for this : use a gulp workflow to render partials rather than mj-include and a templating language like mustache / handlebars to take care of templating needs

@iRyusa iRyusa closed this as completed Nov 28, 2016
@matass
Copy link
Author

matass commented Nov 28, 2016

Ok, thanks for the answer. I'm currently using gulp to render/watch templates. I'll check mustache

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants