templates/news/featured_news_list.html.twig line 1
{% if showImage is not defined %}
{% set showImage = false %}
{% endif %}
<div class="news-list js-featured-news">
{% for item in news %}
{% set lnk = path('news_item',{id:item.id}) %}
{% if showImage and item.image -%}
<div class="news-list__new
{% if col_count is defined %} news-list__new_col_{{ col_count }} {% endif%}
news-list__new_with-image {{ news_item_class|default }}">
<a class="news-list__new-image image-cover" href="{{ lnk }}">
<img src="{{ vich_uploader_asset(item.image)|imagine_filter('news_preview') }}"></a>
<div class="news-list__new-inner">
<div class="news-list__new-title">
<h4>{{ item.caption }}</h4>
</div>
<div class="news-list__new-date"
href="{{ lnk }}">{{ item.publishAt|format_date('long',"dd MMMM yyyy") }}</div>
</div>
</div>
{% else %}
<div class="news-list__new
no-image
dark-background dark-shadow
{% if col_count is defined %}news-list__new_col_{{ col_count }}{% endif%}
{{ news_item_class|default }}">
<a class="item-title news-list__new-title" href="{{ lnk }}">
<h4>{{ item.caption }}</h4>
</a>
<div class="news-list__new-date">{{ item.publishAt|format_date('long',"dd MMMM yyyy") }}</div>
</div>
{% endif %}
{% endfor %}
</div>