Newsletter layouts: the HTML wrapper your broadcasts are sent in
Describes Newsletters 0.8.0.
A layout is the HTML a broadcast is placed inside: your header, colors, footer and unsubscribe link. Broadcasts without one use the site’s standard email layout.
Where to find it
In the admin sidebar, open Newsletters, then Layouts (/admin/newsletters/layouts). You need the Newsletters permission.
Layouts: none yet, so broadcasts use the standard email layout.
The layouts list
Each row shows the layout’s Name, the Languages it has HTML for, and its Status. A Default badge marks the layout new broadcasts start with; System email marks a row carried over from the old system email templates.
The status menu shows Active, Archived or All statuses. The row menu offers:
- Edit.
- Make default: new broadcasts will start with this layout. Only an active layout can be the default.
- Archive: after the confirmation Archive this layout? Broadcasts already using it keep it. An archived layout can’t be picked for new broadcasts.
- Restore: for an archived layout. System email rows can’t be restored.
Use the standard layout by default clears the default, so new broadcasts start with the standard email layout again.
Editing a layout
A layout: the HTML around every broadcast, per language.
- Name: an internal name in lowercase Latin letters, numbers and underscores, starting with a letter, such as
monthly_news. The form may suggest one (Use this name). - Language tabs: one per site language. A green dot marks a tab that has HTML. A tab marked not a site language holds text for a language the site no longer uses.
- Display name: the name shown in the broadcast form’s Layout menu.
- Subject pattern (optional): wraps the broadcast’s subject. It must contain
{{subject}}, for example[Nordwind] {{subject}}. Leave it blank to send the subject unchanged. - HTML: the layout itself.
{{{content}}}is where the broadcast goes. Also available:{{{header}}},{{{footer}}},{{logo_url}},{{accent_color}},{{site_name}},{{site_url}},{{subject}},{{name}},{{email}},{{unsubscribe_url}}and{{preferences_url}}. - Text (kept for reference): a plain-text version stored with the layout.
The Preview shows the current tab’s HTML with a sample broadcast. Save layout stores it.
Placeholders and languages
Values in double braces, like {{name}}, are escaped; triple braces, like {{{header}}}, insert HTML as it is. Each recipient gets the layout in their language; if it has no HTML in that language, the base language, then the site’s language, then any language is used.
An email that has no {{unsubscribe_url}} in the body, the layout or the site’s footer gets a small Unsubscribe line added at the end. A {{preferences_url}} link doesn’t count, because that link expires.
What it doesn’t do
- The plain-text part of a broadcast is never wrapped in the layout.
- Layouts can be archived but not deleted.
- There is no visual editor; layouts are written in HTML.