Customize notifications using layouts
Helghardt Avenant avatar
Written by Helghardt Avenant
Updated this week

Do you have an HTML email template design you want to apply to all of your notifications? With the Rehive Notification Extension’s Layouts section, you can add HTML and text style layouts, that include branding, company colors, headers, footers etc. Once your layout has been added, you can add them to your existing email notifications and any new ones you create.

To add a layout, navigate to the Dashboard > Notifications Extension > Layouts. Rehive provides two ready-made templates, one for user emails and one for admin emails if you don't have any layouts of your own yet. You can edit these as you wish and use them as a base to get going.

Creating your own layouts

You can use company context variables inside layouts to populate company information automatically. Available variables are:

{{context.company.id}} - Will populate your app ID

{{context.company.name}} - Will populate your company's name

{{context.company.system_email}} - Will populate your company's system email address

Layouts work by wrapping around your notification content to add the layout styling and content. In order for this to work, you need to add content blocks within your HTML and Text layouts which define where your notification content will begin and end. Include {% block content %} to signify where your content begins, and {% endblock %} to signify where your content ends inside your layout. Rehive layout templates include these blocks by default. Example:

<html>
<body>
<h1>Example layout heading</h1>
{% block content %} {% endblock %}
</body>
</html>

Did this answer your question?