List of statements to use in your email templates
if, elif and other variations
Examples of more extensive uses of If logic see If Logic - Create customised emails
To show a students first name or preferred name
{% if profile.preferred_name %} {{ profile.preferred_name }} {% else %} {{ profile.first_name }} {% endif %}
To show first name and preferred name if there is one
{{ profile.first_name }} {% if profile.preferred_name %} {{ profile.preferred_name }}) {% endif %} {{ profile.last_name }}
To select all year groups greater than a specified year (the Grade/Year Value is shown in Grade of Entry Settings)
{% if profile.entry_grade|gt:6 %} add information here {% endif %}
To select all year groups less than specified
{% if profile.entry_grade|lt:7 %} add information here {% endif %}
To select a specific year group
{% if profile.entry_grade == 5 %} add information here {% endif %}
To select a specific set of year groups with different responses based on year of application
{% if profile.entry_grade|gt:-1 and profile.entry_grade|lt:3 %} For {{ campus.name }} {{ profile.entry_grade_label }} entry, (from Kindy to year 2) add information here
{% elif profile.entry_grade|gt:2 and profile.entry_grade|lt:7 %} For {{ profile.entry_grade_label }}, {{ profile.entry_year }} entry, (from Year 3 to Year 6) add information here
{% elif profile.entry_grade|gt:6 and profile.entry_grade|lt:9 %} For {{ profile.entry_grade_label }}, {{ profile.entry_year }} entry, (Year 7 to Year 9) add information here{% else %}
For {{ campus.name }} {{ profile.entry_grade_label }} entry (Year 10 to Year 12) add information here{% endif %}
To add a number of days into the future (in correct format) this example is 30 days in the future note the + sign
{{ now|as_date|add_days:+30|date:"j F Y" }}
To add a number of days in the past (in correct format) this example is 5 days in the past note the - sign
{{ now|as_date|add_days:-5|date:"j F Y" }}
To specify the year prior to application year this example is 1 year prior note the - sign
{{ profile.entry_year|add:-1 }}
To specify a different response based on the Interview type this example of for Uniform shop or Interview
{% if interview_booking.interviewer.name == 'Uniform Shop' %} add information here (this 'description' must match the Booking type exactly)
{% elif interview_booking.interviewer.name == 'Interview' %} add information here {% endif %} (this 'description' must match the Booking type exactly)