2023-01-10 14:29:23 +01:00
|
|
|
{% extends 'partials/base.html.twig' %}
|
2023-01-10 14:33:28 +01:00
|
|
|
{% set collection = page.collection()|filter(page => page.header.event is defined) %}
|
2023-01-10 14:29:23 +01:00
|
|
|
|
2023-01-10 14:35:02 +01:00
|
|
|
{% block content %}
|
2023-01-10 14:29:23 +01:00
|
|
|
{{ page.content|raw }}
|
|
|
|
{# display posts with 'featured' tag on current news page #}
|
|
|
|
{% for child in taxonomy.findTaxonomy({'tag': "featured"}) %}
|
|
|
|
{% include 'partials/news-list-item.html.twig' with {news: page, page: child} %}
|
|
|
|
{% endfor %}
|
|
|
|
|
|
|
|
{# display posts without 'featured' tag #}
|
|
|
|
{% for child in collection %}
|
|
|
|
{% if "featured" not in child.taxonomy['tag'] %}
|
|
|
|
{% include 'partials/news-list-item.html.twig' with {news: page, page: child} %}
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
|
|
|
{% endblock %}
|