Skip to main content

Attendup Templating Language (ATL)

Attendup Templating Language (ATL) is a lightweight, intuitive templating system designed for creating dynamic MJML and HTML email templates. It enables template authors to use predefined variables, conditionals, loops, and components to build modular and reusable email layouts — without the need for programming or component creation.


Core Features & Syntax​

ATL syntax uses double square brackets [[ ... ]] for directives.

Variables​

Output values from the template context using:

[[variable_name]]

Supports nested variables via dot notation:

Hello [[first_name]]!

To view available variables, see the Variables and Components guide.


Conditionals​

Control what content is displayed with conditional blocks:

[[if bookings]]
You have bookings.
[[else]]
No bookings available.
[[endif]]

Use negation:

[[if not bookings]]
No bookings available.
[[endif]]

Conditions evaluate the truthiness of variables in the current context.


Loops​

Repeat sections for each item in a list:

[[for booking in bookings]]
Booking: [[booking.resource_name]]
[[if not is_last]]
<hr>
[[endif]]
[[endfor]]

[[is_last]] is a special variable set to true on the last iteration.

tip

Loops can be nested, allowing complex structures:

[[for booking in bookings]]
[[for ticket_type in booking.ticket_types]]
Ticket Type: [[ticket_type.name]]
Price: [[ticket_type.price]]
[[endfor]]
[[endfor]]

Components​

Use predefined components to include pre-built sections in your templates.

[[component bookings]]

To see available components, refer to the Variables and Components guide.


Comments​

Ignore content inside comments:

[[! This is a comment and will be ignored ]]

Example Template​

<mjml>
<mj-body>
<mj-section>
<mj-column>
<mj-text font-size="20px" font-weight="bold">Hello [[first_name]]!</mj-text>
</mj-column>
</mj-section>

[[! This is a comment ]]

[[if bookings]]
[[for booking in bookings]]
<mj-section>
<mj-column>
<mj-text>[[booking.resource_name]]</mj-text>
<mj-text>Booking Reference: [[booking.reference]]</mj-text>
<mj-text>[[booking.start_date]]: [[booking.start_time]] - [[booking.end_time]]</mj-text>
</mj-column>
</mj-section>
[[if not is_last]]
<mj-section>
<mj-column>
<mj-divider border-color="#ccc" />
</mj-column>
</mj-section>
[[endif]]
[[endfor]]
[[else]]
<mj-section>
<mj-column>
<mj-text>You have no bookings.</mj-text>
</mj-column>
</mj-section>
[[endif]]

[[component bookings]]

<mj-section>
<mj-column>
<mj-text font-size="12px" color="#999">Thank you for booking with [[site_name]]!</mj-text>
</mj-column>
</mj-section>
</mj-body>
</mjml>
info

Got a feature request for ATL? We want to hear it! Anyone can suggest new features or improvements to ATL. Just submit your idea on our feature request board and we’ll consider it for future updates.