{% if not newsFeedArray is empty %} {% set evenIndex = 1 %} {% set adIndex = 0 %} {% for i,item in newsFeedArray %} {% if item.title is defined %}
  • {{ item.title }}
    {{ item.title|raw }} {% if is_protected is defined and is_protected %} hits:{{ item.hits }} {% endif %}
  • {% endif %} {% if ads is defined and ads and ((evenIndex == 1 and (i + 1) % 5 == 0 and (i + 1) / 5 > adIndex) or (evenIndex == 0 and i % 5 == 0 and i / 5 > adIndex)) and i > 0 %} {% if evenIndex == 1 %} {% set adIndex = ((i + 1) / 5) + adOffset %} {% set evenIndex = 0 %} {% else %} {% set adIndex = (i / 5) + adOffset %} {% set evenIndex = 1 %} {% endif %}
  • {{ ads.printAd('mobile', 'newsfeed', adIndex,0,1)|raw }} {{ ads.printAd('desktop', 'newsfeed', adIndex,0,1)|raw }}
  • {% endif %} {# {% if ads is not null and ((i % 6 == 0 and oddPosition == 0) or (i % 5 == 0 and evenPosition == 1)) %} {% if i % 6 %} {% set oddPosition = 1 %} {% if not testDesign is defined %}
  • {{ ads.printAd('mobile', 'newsfeed', 1,0,1)|raw }} {{ ads.printAd('desktop', 'newsfeed', 1,0,1)|raw }}
  • {% else %}
  • {{ ads.printAd('mobile', 'newsfeed-new', 1,0,1)|raw }} {{ ads.printAd('desktop', 'newsfeed-new', 1,0,1)|raw }}
  • {% endif %} {% endif %}#} {% endfor %} {% endif %}