

This lets you see how your Template will look when sending an email. When viewing an existing Template within Postmark’s editor, there is an option to associate the Template with a Layout.Īdd a new layout will automatically add a basic layout to the template and associates it to your Template.Īfter selecting a Layout, choosing Preview will show the Template content as it will appear with the Layout. Or you can add a Layout when creating the Template. When adding the new Template, there’s an option to use the Template with an existing Layout. New or existing Templates can use Layouts. Worried about forgetting the syntax? The Layout editor has a handy button to add the placeholder at your cursor’s location. To indicate where your template content will go, use the content placeholder:Ī single content placeholder is required to save a layout.īy default, the content placeholder is added to the starter Layouts. This makes it easier for you to edit while still bringing all the benefits and reliability of inlining. Postmark will automatically inline those styles when the email is delivered. Like Postmark’s starter Templates, the starter Layouts include CSS in a style block in the head of the email, instead of inline with the content like most email clients prefer. In the editor, you can add or edit the HTML and CSS, then see a live preview. You’re now ready to create a beautiful Layout for your Templates.Īfter adding your layout, it’s a snap to edit it using Postmark’s editor.
#MJML VARIABLES CODE#
The adventurous can also code their own Layout from scratch. To give you a head start, Postmark comes with a few starter Layouts. Each individual Template only contains the content of the email, while the reusable content is shared with the chosen Layout.
#MJML VARIABLES PASSWORD#
With Layouts, your receipts, welcome emails, and password reset can share common elements. Previously, if your Templates shared common CSS elements, or headers and footers, the code for each Template needed to be managed independently.

Layouts are perfect for wrapping your email Templates with reusable CSS styles, headers, and footers. Layouts let you generate reusable code for Templates in Postmark.
