{% extends 'base.html.twig' %}
{% set page_title = 'Aktualności' %}
{% block content_class_name %}news{% endblock %}

{% block content %}
    {{ parent() }}

    {% for key,item in news %}
        <time class="title timeago" datetime="{{ item['date'] }}">{{ item['date']|localizeddate('full', 'none', 'pl')|capitalize }}</time>
        <div class="body">{{ item['contents']|raw }}</div>
        <div class="author">[{{ item['author']|raw }}]</div>
        <br><br>
    {% endfor %}

    {% if page == 'main' %}
    <div><a href="{{ path('aktualnosci', {'page': 'archiwum'}) }}">Archiwum</a></div>
    {% endif %}

{% endblock %}

{% extends 'base.html.twig' %}
{% set page_title = 'Aktualności' %}
{% block content_class_name %}news{% endblock %}

{% block content %}
    {{ parent() }}

    {% if news|length > 0 %}

        {% for key,item in news %}
            <time class="title timeago" datetime="{{ item['date'] }}">{{ item['date']|localizeddate('full', 'none', 'pl')|capitalize }}</time>
            <div class="body">{{ item['contents']|raw }}</div>
            <div class="author">[{{ item['author']|raw }}]</div>
            <br><br>
        {% endfor %}

        {% if page == 'main' %}
        <div><a href="{{ path('aktualnosci', {'page': 'archiwum'}) }}">Archiwum</a></div>
        {% endif %}
    {% else %}

        Brak aktualności.

    {% endif %}

{% endblock %}

Fix the case with empty news.
Fix the case with empty news.
