{% spaceless %} {% if has_proper_name or not is_authenticated %} Hello, {{name}}. {% elif is_authenticated %} Hello, {{name}}. {% endif %} {% endspaceless %}