{% for currentNewsIndex,news in newsArray %}
{% set i = currentNewsIndex %}
{% if app.request.get('_route') == "homepage" %}
{% if i % 6 == 0 %}
{% set boxIndex = i / 6 %}
{% if newsBoxes[boxIndex] is defined %}
{{ newsBoxes[boxIndex]|raw }}
{% endif %}
{% endif %}
{% endif %}
{% if currentNewsIndex == 0 and not ajax and app.request.get('_route') == "homepage" %}
{{ render(controller('App\\Controller\\DefaultController::unreadNews')) }}
{{ include('elements/newsfeedCategoriesButton.html.twig') }}
{% endif %}