Current situation
At the moment, all email content is stored directly attached to a specific campaign. Templates only define certain aspects of that email such as the footer or theme colors. This makes it difficult to add A/B tests or one-off emails (i.e. transactional emails or automations)
Solution
The concept of a Template needs to be redefined. In the future, a Template is where email content (text/mjml/html) is stored. In addition to that, Layouts are introduced. Layouts are very similar to Templates but they have a content slot for the Template editor. Layouts can be plain text, html, or mjml. A Template may or may not use a Layout. Templates also include the email subject. HTML layouts are only compatible with HTML templates. MJML templates can be used with the MJML/Block editor as well as the Markdown editor.
Plain Text Example
Plain-text layouts must include the {{ content }} placeholder.
{{ content }}
---
The footer is part of the Layout
MJML Example
MJML Layouts must include the keila-content tag as a child of mj-body.
<mjml>
<mj-head>
<mj-attributes>
<mj-all font-family="Comic Sans MS" />
</mj-attributes>
</mj-head>
<mj-body>
<keila-content />
<mj-section>
<mj-column>
<mj-text>
This is a Layout footer in MJML
</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
Necessary Steps
Current situation
At the moment, all email content is stored directly attached to a specific campaign. Templates only define certain aspects of that email such as the footer or theme colors. This makes it difficult to add A/B tests or one-off emails (i.e. transactional emails or automations)
Solution
The concept of a Template needs to be redefined. In the future, a Template is where email content (text/mjml/html) is stored. In addition to that, Layouts are introduced. Layouts are very similar to Templates but they have a content slot for the Template editor. Layouts can be plain text, html, or mjml. A Template may or may not use a Layout. Templates also include the email subject. HTML layouts are only compatible with HTML templates. MJML templates can be used with the MJML/Block editor as well as the Markdown editor.
Plain Text Example
Plain-text layouts must include the
{{ content }}placeholder.MJML Example
MJML Layouts must include the
keila-contenttag as a child ofmj-body.Necessary Steps