{% if attachment.getFilename() is not null %}
{% if attachment.getFilename() is not null %} {{ attachment.getBestTitle(note) }} {% else %} {{ attachment.getBestTitle(note) }} {% endif %}
{% else %} {# Not stored locally. #} {% endif %}