{% set thumbnail_parameters = {'id': attachment.getId(), 'w': config('thumbnail','width'), 'h': config('thumbnail','height')} %} {% if attachment.getIsLocal() %} {% set handled = false %} {% for block in handle_event('ViewAttachment' ~ attachment.getMimetypeMajor() | capitalize , {'attachment': attachment, 'thumbnail_parameters': thumbnail_parameters}) %} {% set handled = true %} {{ block | raw }} {% endfor %} {% if not handled %}
{% endif %} {% else %} {% for block in handle_event('ViewRemoteAttachment', {'attachment': attachment, 'thumbnail_parameters': thumbnail_parameters}) %} {{ block | raw }} {% endfor %} {% endif %}