{% 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 %}
  • {% if news.isVideo() %} {% endif %} {{ news.formatImageTitle() }}

    {{ news.title|raw }}

    {% if is_protected is defined and is_protected %} hits:{{ news.hits }} {% endif %}
    {% if news.author and not news.categoryData is empty and news.categoryData.isArticle() %} {{ news.author }} {% else %} {{ news.getNewsfeedCategoryName }} {% endif %}
    {% if news.isImportant() %}
    {# {if:GLOBALS.in_array(news.id,mostreadIdsArray)} {end:}#}
    {% endif %}
  • {% if ads is defined %} {% if (i + 5) % 6 == 0 and i != 0 %} {% set index = (i + 5) / 6 %} {% if index == 1 and (not ajax is defined or not ajax) %}
  • {{ ads.printAd('desktop', 'newsfeed', index, 1)|raw }}
  • {{ ads.printAd('mobile', 'newsfeed', index, 1)|raw }}
  • {% else %}
  • {{ ads.printAd('desktop', 'newsfeed', index)|raw }}
  • {{ ads.printAd('mobile', 'newsfeed', index)|raw }}
  • {% endif %} {% endif %} {% endif %} {% endfor %}