{% with link=instance.get_link %} {% if link %}{% endif %} {{ instance.get_title }} {% if link %}{% endif %} {% endwith %}