{% extends 'Front/layout.html.twig' %}

{% set metatitle = maincontent.metatitle ? maincontent.metatitle : maincontent.menu ~ ' - Cgénial' %}
{% set metadescription = maincontent.metadescription? maincontent.metadescription: null %}

{% block body %}
    <!--Page liste - {{ menu }}-->
    <div class="content list {{ maincontent.menu.class }}">
        <div class="text">
            {#% for maincontent in main %#}
                <h1>{{ maincontent.title }}</h1>
                {#{{ maincontent.created|date("d/m/Y") }}#}
                {{ maincontent.article|raw }}<br/>
            {#% endfor %#}
        </div>

        <div>
            {% for content in contents %}
                <div class="list-item">
                {% if content.picture!='' %}
                    <div class="imgBlock">
                        <img src="{{ asset(content.getWebPath()) }}" alt="{{ content.title }}" />
                    </div>
                {% endif %}
                <h3>{{ content.title }}</h3>
                {{ content.article|raw }}<br/>
                <div class="clear"></div>
                </div>
            {% endfor %}
        </div>
    </div>      
        {#{ render(controller('AppBundle:Templates:modules', {'menu':menu})) }#}
{% endblock %}