Email and SMS Template Tags Reference

This page lists all template tags available when composing email and SMS templates, together with a description of each and an example value.

Template tags are written using the Django Template Language (DTL) by default: {{ tag }} outputs a value, and {% for item in list %}...{% endfor %} iterates over a list. Handlebars-format templates use the same {{ tag }} syntax for simple values and {{#each list}}...{{/each}} for lists.

The tags available in a template depend on the Type (entity) the template is configured for.


Tags available for all template types

These tags are available in every email and SMS template, regardless of type.

Tag Description Example
{{ race.name }} The name of the race 2024 National Championships
{{ race.status }} The current status of the race accepted
{{ race.race_date }} The date of the race 15 June 2024

The following tags are available in email templates only (not SMS):

Tag Description Example
{{ mailer.name }} The name of the platform Race Entries
{{ organisation.name }} The name of your organisation British Canoeing
{{ organisation.subaccount }} The name of the subaccount, if applicable Wales
{{ organisation.site_url }} The URL of your organisation’s site https://entries.example.com
{{ organisation.logo }} The URL of your organisation’s logo image /media/logo.png

Order templates

Order templates are addressed to the person who submitted an order. In addition to the common tags above, the following tags are available.

Tag Description Example
{{ order.id }} The numeric ID of the order 42
{{ order.name }} The name of the order submitter Smith, J
{{ order.paid }} Whether the order is paid (True or False) True
{{ order.total_paid }} The total amount paid (formatted with currency symbol) £25.00
{{ order.price }} The total price of the order (formatted with currency symbol) £25.00
{{ order.payment_type }} The payment method used stripe
{{ entries }} The list of entries in the order (see below)

The entries tag is a list of entries. Each item in the list has the same fields as the entry tags below. Use a loop to output information for each entry:

{% for entry in entries %}
  {{ entry.name }} — {{ entry.race_name }} — {{ entry.number }}
{% endfor %}

Entry templates

Entry templates are addressed to the entry as a whole. In addition to the common tags above, the following tags are available.

Tag Description Example
{{ order.id }} The numeric ID of the order 42
{{ order.name }} The name of the order submitter Smith, J
{{ order.paid }} Whether the order is paid (True or False) True
{{ order.total_paid }} The total amount paid (formatted with currency symbol) £25.00
{{ order.price }} The total price of the order (formatted with currency symbol) £25.00
{{ order.payment_type }} The payment method used stripe
{{ entry.race }} The race class code K1
{{ entry.race_name }} The race class name Kayak Single
{{ entry.race_class.name }} The race class full name Kayak Single
{{ entry.race_class.code }} The race class code K1
{{ entry.race_class.description }} The race class description Senior Kayak Single
{{ entry.crew_type.name }} The crew type name K1
{{ entry.crew_type.short_name }} The crew type short name K1
{{ entry.crew_type.description }} The crew type description Kayak Single
{{ entry.name }} A description of the entry K1 - Smith, J
{{ entry.price }} The entry price (formatted with currency symbol) £25.00
{{ entry.status }} The entry status Accepted
{{ entry.paid }} Whether the entry is paid (True or False) True
{{ entry.refunded }} Whether the entry is refunded (True or False) False
{{ entry.number }} The race / start number 042
{{ entry.members }} The list of crew members on the entry (see below)

The entry.members tag is a list of crew members. Each item in the list has the same fields as the crew member tags below. Use a loop to output information for each crew member:

{% for member in entry.members %}
  {{ member.first_name }} {{ member.surname }} — {{ member.club_name }}
{% endfor %}

Crew member templates

Crew member templates are addressed to an individual crew member. In addition to the common tags above, the following tags are available. The order and entry tags have the same structure as described in the sections above.

Tag Description Example
{{ order.id }} The numeric ID of the order 42
{{ order.name }} The name of the order submitter Smith, J
{{ order.paid }} Whether the order is paid (True or False) True
{{ order.total_paid }} The total amount paid (formatted with currency symbol) £25.00
{{ order.price }} The total price of the order (formatted with currency symbol) £25.00
{{ order.payment_type }} The payment method used stripe
{{ entry.race }} The race class code K1
{{ entry.race_name }} The race class name Kayak Single
{{ entry.race_class.name }} The race class full name Kayak Single
{{ entry.race_class.code }} The race class code K1
{{ entry.crew_type.name }} The crew type name K1
{{ entry.name }} A description of the entry K1 - Smith, J
{{ entry.status }} The entry status Accepted
{{ entry.paid }} Whether the entry is paid (True or False) True
{{ entry.number }} The race / start number 042
{{ crew_member.full_name }} The crew member’s full name Jane Smith
{{ crew_member.surname }} The crew member’s surname Smith
{{ crew_member.first_name }} The crew member’s first name Jane
{{ crew_member.class_name }} The age/gender class code SJW
{{ crew_member.club_code }} The club code LVW
{{ crew_member.club_name }} The club full name Llandaff Canoe Club
{{ crew_member.division }} The ranking division D1
{{ crew_member.date_of_birth }} The crew member’s date of birth 1 January 1990
{{ crew_member.membership_number }} The membership / licence number 123456
{{ crew_member.membership_expiry }} The membership expiry date 31 December 2024
{{ crew_member.membership_type }} The membership type Full
{{ crew_member.membership_organisation }} The name of the membership organisation British Canoeing
{{ crew_member.competitor_group }} The competitor group name Senior

This site uses Just the Docs, a documentation theme for Jekyll.