Template variables / tags / keys


Each template file has access to a common set of variables as well as custom ones for the current context. e.g. the product_info.html.twig file and the layouts/index.html.twig file both have access to global variables such as "company.name". However, the product_info.html.twig file will have access to specific product variables that the layouts/index.html.twig file doesn't.


A full list and auto-updated list of global variables is available on each site and can be found in Admin > Template Variables. In the same area, we also include instructions on how to look up available variables on a template through use of the "dump()" function.


Email Manager template tags


Emails sent via Email Manager have access to the following templates for the site:


{{ company_name }} <- Your site company name from Site Settings

{{ company_logo_image }} <- Site logo from Site Settings

{{ company_slogan }} <- Site slogan from Site Settings

{{ company_telephone }} <- Site company telephone number from Site Settings

{{ email_secret }} <- a secret key used per email sent, used with unsubscribe links etc.

As well as templates per customer the email is sent:


{{ first_name }}

{{ last_name }}

{{ membership_code }}

{{ email }}

{{ email_urlsafe }}

{{ id }}

{{ id_encoded }}

{{ subscribe_link }}

{{ user_date_joined }}

{{ user_town }}

{{ user_tel_no }}

{{ display_name }}

{{ email }}