{% set handled = false %} {% for block in handle_event('ViewAttachment', {'attachment': attachment, 'note': note, 'title': title}) %} {% set handled = true %}
{{ block | raw }}
{% endfor %} {% if not handled %}
{% if attachment.getFilename() is not null %} {{ title }} {% else %} {{ title }} {% endif %}
{% endif %}