<div class="widget widget-post">
<div class="widget-header">
<h5 class="title">Most Popular Post</h5>
</div>
<div class="widget-body">
<ul>
{% for content in collection %}
<li>
<div class="thumb">
<a href="{{ path('post_show', {'slug':content.slug}) }}">
<img src="{{ asset(content.getThumbnailPath())|imagine_filter('squared_thumbnail_small') }}" alt="{{ content.title }}">
</a>
</div>
<div class="content">
<a href="{{ path('post_show', {'slug':content.slug}) }}">{{ content.title }}</a>
<span>{{ content.datePublished|date("j F Y") }}</span>
</div>
</li>
{% endfor %}
</ul>
</div>
</div>