{% set handled = false %}
{% for block in handle_event('ViewAttachment', {'attachment': attachment, 'note': note}) %}
{% set handled = true %}
<div class="note-attachments-unit">
{{ block | raw }}
</div>
{% endfor %}
{% if not handled %}
<i> <a href="{{ path('attachment_show', {'id': attachment.getId()}) }}">{{ attachment.getBestTitle(note) }}</a> </i>
{% endif %}