Skip to content

Commit 48c4339

Browse files
3v0k4unamashana
andauthored
Email layout: update docs (#6)
docs(email-layout): update Co-authored-by: Hana Mohan <66077+unamashana@users.noreply.github.com>
1 parent e700554 commit 48c4339

File tree

2 files changed

+11
-3
lines changed

2 files changed

+11
-3
lines changed

docs/docs/email-layouts.mdx

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,23 @@ title: Email Layouts
66
This feature is in beta. We'd love your feedback — please <a href="mailto:hello@magicbell.com">get in touch</a> and let us know how it can be improved.
77

88
If you're curious what our team is working on, see our <a href="https://roadmap.magicbell.community/">roadmap</a> and follow us on <a href="https://twitter.com/magicbell_io">Twitter</a>!
9+
910
</Note>
1011

11-
Email Layouts are a great way to decouple the rendering of a notification from the data that powers it. Email Layouts are global and apply to all notifications sent through the email channel.
12+
Email layouts are a great way to add HTML content around your notifications, like a header or a footer. They apply to all notifications sent through the email channel.
13+
14+
Nota bene, if you are using templates in your email provider (via [overrides](/docs/overrides#provider-overrides)), all the rendering happens there and the email layout is ignored.
1215

1316
## How to compose email layouts
1417

15-
Please visit the Channels tab in the dashboard, then select Email Layout. Here, copy/paste the HTML of your current email template. Use the merge tag `{{ template.content }}` as a placeholder for the content. The content will default to `{{ notification.content }}` for uncategorized notifications and categories without configured templates.
18+
Please visit the Settings tab in the dashboard, then select Email Layout. Here you can specify your layout according to the following rules.
19+
20+
When the email layout is left empty, email notifications will render either:
21+
22+
- `{{ notification.content }}` for uncategorized notifications or categories without a channel template
23+
- the [channel template](/docs/templates) when a [category](/docs/categories) is specified and an email channel template is defined for that category
1624

17-
This layout will wrap around all notifications sent to the email channel.
25+
If the email layout is specified, you can use HTML and the `{{ template.content }}` merge tag, which is replaced by either the notification content or the rendered channel template as explained above.
1826

1927
<img
2028
className="full-mobile"

docs/public/uploads/email-layout.png

-139 KB
Loading

0 commit comments

Comments
 (0)