Skip to content

E-mail layouts

A layout is the shared frame every notification e-mail sits in: a logo and colour strip at the top, address and legal note at the bottom. You write the body in each template and the frame once. This page covers Notifications › Email layouts in the administration menu. The screen is in Turkish only for now; Turkish labels are in parentheses.

Layouts are used on the e-mail channel only. Viewing needs the permission to view notification templates; changing needs the manage permission.

The screen lists your organization’s layouts. The default one carries a Default (“Varsayılan”) tag. If there is no layout yet, the screen says so; without a layout, templates are sent with their own HTML only.

Row buttons: Edit (“Düzenle”, with the manage permission) or View (“Görüntüle”), and Delete layout (“Layout’u sil”).

  1. Click New layout (“Yeni layout”).
  2. Enter a Name (“Ad”), for example Company frame. Two layouts cannot share a name (“Bu adla bir layout zaten var.”).
  3. Write the frame’s HTML in Layout HTML. Put {{ content }} where the body goes; this slot is required.
  4. To use it for all e-mails, tick Default layout (“Varsayılan layout”).
  5. The Layout preview (“Layout önizlemesi”) on the right shows the frame around a sample body (“Şablon içeriği”). Without {{ content }} the preview says the slot is needed.
  6. Save. A note says the layout was created; if something was cleaned from the HTML, it says it was saved with warnings.

If you close the window with unsaved changes, the screen warns that they will be lost.

A layout sees only organization, recipient and system variables: {{ tenant.name }}, {{ tenant.logo_url }}, {{ tenant.brand_color }}, {{ recipient.name }}, {{ system.year }}, {{ system.app_url }} and so on. Form and workflow variables are used only in the template body. The same HTML safety rules as templates apply: Notification templates.

<table width="100%" cellpadding="0" cellspacing="0">
<tr><td style="background: {{ tenant.brand_color }}; height: 6px;"></td></tr>
<tr><td style="padding: 24px;"><img src="{{ tenant.logo_url }}" alt="{{ tenant.name }}" height="32"></td></tr>
<tr><td style="padding: 0 24px 24px;">{{ content }}</td></tr>
<tr><td style="padding: 16px 24px; font-size: 12px; color: #666;">
This message was sent automatically by {{ tenant.name }} with Defthand. © {{ system.year }}
</td></tr>
</table>
  1. If a Layout was chosen in the template’s details window, that layout.
  2. If not (Default layout), your organization’s default layout.
  3. If there is no default layout, no frame: only the template’s HTML.

The preview, the test e-mail and real sends all follow this rule. Making a layout the default removes the default from the previous one.

Defthand’s ready-made e-mails use the “Sistem e-posta çerçevesi” (system e-mail frame) layout every organization gets. It shows your organization’s name (and logo, if any), a strip in the brand colour, and an “automatic message” line in the recipient’s language. The logo and colour come from Settings › Branding; the logo must be at a public address to show in e-mails.

The system frame is not your organization’s default layout: it does not affect your own templates. To change a ready-made template’s frame, choose your own layout in that template’s Edit details › Layout.

Delete layout asks for confirmation. A layout used by a template cannot be deleted (“Bu layout’u kullanan şablonlar var; önce şablonlarda başka bir layout seçin.” — templates use it; choose another layout in them first).