{% import '@SyliusUi/Macro/pagination.html.twig' as pagination %} {% import 'SyliusUiBundle:Macro:messages.html.twig' as messages %} {% extends '@SyliusShop/layout.html.twig' %} {% block content %} {% block blog_breadcrumb %} {% endblock %} {% block blog_header %}

{{ 'odiseo_sylius_blog_plugin.ui.blog.header'|trans }}
{{ 'odiseo_sylius_blog_plugin.ui.blog.subheader'|trans }}

{% endblock %} {% block blog_articles %}
{% if resources|length > 0 %}
{% for article in resources %}
{% if article.images|length > 0 %}
{{ article.images[0].path }}
{% endif %}
{{ article.title }}
{{ article.createdAt|date }} {% if article.author %} by {{ article.author.username }} {% endif %}
{% if disqus_shortname() %}
{% else %} {{ article.enabledComments|length }} comments {% endif %}

{% if article.content|striptags|length > 200 %} {{ article.content|striptags|slice(0, 200)|raw }}... {% else %} {{ article.content|striptags|raw }} {% endif %}

{% if article.categories|length > 0 %}
{% for articleCategory in article.categories %} {% endfor %}
{% endif %}
{% endfor %}
{{ pagination.simple(resources) }} {% else %} {{ messages.info('sylius.ui.no_results_to_display') }} {% endif %}
{% include '@OdiseoSyliusBlogPlugin/Shop/_sidebar.html.twig' %}
{% endblock %} {% if disqus_shortname() %} {% block blog_disqus %} {% include '@OdiseoSyliusBlogPlugin/Shop/Article/_disqus.html.twig' %} {% endblock %} {% endif %} {% endblock %}