Newer
Older
pre-www / src / pages / news.twig
{% extends "../layout/archive.twig" %}

{% set type = "news" %}

{% block archive_col_1 %}
    <nav class="posts-archive-navigation">
        <ul>
            {% set queried_post_types = [
                "events", "news", "notices"
            ] %}
            {% for queried_post in queried_post_types %}
                <li class=" {% if queried_post == type %}is-active{% endif %}"><a href="{{post_type[~queried_post~].url}}">{{post_type[~queried_post~].name}}</a></li>
            {% endfor %}
        </ul>
    </nav>
{% endblock %}

{% block archive_col_2 %}
    <div class="posts-archive-description">
        {{post_type[~type~].description}}
    </div>
{% endblock %}

{% block filters %}

    <div>
        {% set archive_filters = {
            "key": "filters",
            "classes": "",
            "content": {
                "items": [
                    {
                        "type": "term",
                        "post_type": type,
                        "id": 0
                    },
                    {
                        "type": "term",
                        "post_type": type,
                        "id": 1
                    }
                ],
                "has_search": true
            }
            } %}
        {% include "../blocks/filters.twig" with {"block": archive_filters } %}
    </div>

{% endblock %}

{% block posts %}

    <div class="block-tease-row block-container">

        <div class="tease-wrapper">
            {% for post in post_type[~type~].items %}
                {% include "../layout/partials/tease.twig" with {"post": post } %}
            {% endfor %}
        </div>

    </div>

{% endblock %}

{% block pagination %}
    {% include "../blocks/pagination.twig" %}
{% endblock %}