Mjml: Pass data inside <mj-include />

Created on 21 Jun 2017  路  1Comment  路  Source: mjmlio/mjml

Would be cool I think if you could

<mj-include path='./emails/common/header' title='Welcome Email' />

So I can use the identical header for each template, but with a different title.

Most helpful comment

Hey Seb, this has been discussed before and we understand the value of such a feature.

However, it starts with variables, then conditionals, loops... and you end up with reinventing the wheel and building a whole new templating language. There are already a lot of templating languages out there doing the job very well, so we prefer to avoid bundling one in and sticking to responsive email. Yet, you can still use one along with MJML!

>All comments

Hey Seb, this has been discussed before and we understand the value of such a feature.

However, it starts with variables, then conditionals, loops... and you end up with reinventing the wheel and building a whole new templating language. There are already a lot of templating languages out there doing the job very well, so we prefer to avoid bundling one in and sticking to responsive email. Yet, you can still use one along with MJML!

Was this page helpful?
0 / 5 - 0 ratings