{% extends 'base.html' %} {% block content %}

{{ resource.title }}

{# Iterate and use en sections by default and use localized versions only if they are present #} {% set enNewsSectionTranslation = section.translations | filter(attribute='lang', value='en') | first %} {% set enNewsSection = get_section(path=enNewsSectionTranslation.path) %} {% for page in section.pages %} {% set translatedPage = page.translations | filter(attribute='lang', value=lang) | first %} {% if translatedPage %} {% set page = get_page(path=translatedPage.path) %} {% endif %}
 {{ page.date | date(format='%B %e, %Y') }} 
{% if page.content %}
{{ page.content | safe }}
{% endif %} {% for photo in page.assets %} {% endfor %}
{% endfor %} {% endblock content %}