<footer class="m_site-footer">
<div class="m_footer-top">
<div class="m_container-lg">
<div class="m_row">
<div class="m_foot-col">
<a href="{{ path('app_home') }}" >
<img alt="Logo WKWBC" title="Accueil"
src="{{ logo.thumbnail is defined and logo.thumbnail.filename is defined
? path('proxy_avatar', {'path': logo.thumbnail.filename})
: asset('images/defaults/media.png') }}"/>
</a>
</div>
<div class="m_foot-col">
{% if menuCollaborates is not empty %} {# Check if menuCollaborates is not empty #}
{% set localeCode = menuCollaborates[0].category.i18ns[0].locale|split('_')|first %}
{% set i18n = (app.request.locale == localeCode and menuCollaborates[0].category.i18ns[0] is defined) ? menuCollaborates[0].category.i18ns[0] : (menuCollaborates[0].category.i18ns[1] is defined ? menuCollaborates[0].category.i18ns[1] : null) %}
{% if i18n %}
<h4 class="m_title-menu">{{ i18n.name }}</h4>
{% endif %}
{% endif %}
<ul class="m_menu-foot">
{% for menu in menuCollaborates %}
{% set localeCode = menu.i18ns[0].locale|split('_')|first %}
{% set i18n = (app.request.locale == localeCode and menu.i18ns[0] is defined) ? menu.i18ns[0] : (menu.i18ns[1] is defined ? menu.i18ns[1] : null) %}
{% if i18n %}
{% set href_value = menu.routeName|length > 4 ? path(menu.routeName) : menu.link %}
{% set target_value = menu.routeName|length > 4 ? '_self' : '_blank' %}
<li><a href="{{ href_value }}" target="{{ target_value }}" rel="noopener noreferrer">{{ i18n.name }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
<div class="m_foot-col">
{% if items is not empty %} {# Check if menuCollaborates is not empty #}
{% set localeCode = items[0].category.i18ns[0].locale|split('_')|first %}
{% set i18n = (app.request.locale == localeCode and items[0].category.i18ns[0] is defined) ? items[0].category.i18ns[0] : (items[0].category.i18ns[1] is defined ? items[0].category.i18ns[1] : null) %}
{% if i18n %}
<h4 class="m_title-menu">{{ i18n.name }}</h4>
{% endif %}
{% endif %}
<ul class="m_menu-foot">
{% for menu in items %}
{% set localeCode = menu.i18ns[0].locale|split('_')|first %}
{% set i18n = (app.request.locale ==localeCode and menu.i18ns[0] is defined) ? menu.i18ns[0] : (menu.i18ns[1] is defined ? menu.i18ns[1] : null) %}
{% if i18n %}
<li><a href="{{ path(menu.routeName) }}">{{ i18n.name }}</a></li>
{% endif %}
{% endfor %}
</ul>
</div>
<div class="m_foot-col">
{% if menuContact is not empty %} {# Check if menuCollaborates is not empty #}
{% set localeCode = menuContact[0].category.i18ns[0].locale|split('_')|first %}
{% set i18n = (app.request.locale == localeCode and menuContact[0].category.i18ns[0] is defined) ? menuContact[0].category.i18ns[0] : (menuContact[0].category.i18ns[1] is defined ? menuContact[0].category.i18ns[1] : null) %}
{% if i18n %}
<h4 class="m_title-menu">{{ i18n.name }}</h4>
{% endif %}
{% endif %}
<ul class="m_menu-foot">
{% for menu in menuContact %}
{% set localeCode = menu.i18ns[0].locale|split('_')|first %}
{% set i18n = (app.request.locale == localeCode and menu.i18ns[0] is defined) ? menu.i18ns[0] : (menu.i18ns[1] is defined ? menu.i18ns[1] : null) %}
{% if i18n %}
{% if menu.routeName|length > 2 %}
<li><a href="{{ path(menu.routeName) }}">{{ i18n.name }}</a></li>
{% else %}
<li><a href="{{ menu.link }}" target="_blank" rel="noopener noreferrer">{{ i18n.name }}</a></li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
</div>
<div class="m_footer-bottom">
<div class="m_container">
<div class="m_flex m_other-links">
<ul>
{% if appTerms is defined and appTerms.i18ns is defined and appTerms.i18ns|length > 0 %}
{% set localeCode = appTerms.i18ns[0].locale|split('_')|first %}
{% set i18n = (app.request.locale == localeCode and appTerms.i18ns[0] is defined) ? appTerms.i18ns[0] : (appTerms.i18ns[1] is defined ? appTerms.i18ns[1] : null) %}
{% if i18n and appTerms.show == true %}
<li>
<a rel="noopener noreferrer" href="{{ path('app-terms') }}">{{ i18n.name }}</a>
</li>
{% endif %}
{% endif %}
<li class="m_item-lang">
<a href="{{ path('change_locale', {'locale': 'fr'}) }}">FR</a>
</li>
<li class="m_item-lang">
<a href="{{ path('change_locale', {'locale': 'en'}) }}">EN</a>
</li>
{% if cookies is defined and cookies.i18ns is defined and cookies.i18ns|length > 0 %}
{% set localeCode = cookies.i18ns[0].locale|split('_')|first %}
{% set i18n = (app.request.locale == localeCode and cookies.i18ns[0] is defined) ? cookies.i18ns[0] : (cookies.i18ns[1] is defined ? cookies.i18ns[1] : null) %}
{% if i18n and cookies.show == true %}
<li>
<a rel="noopener noreferrer" href="{{ path('app-cookies') }}">{{ i18n.name }}</a>
</li>
{% endif %}
{% endif %}
</ul>
</div>
</div>
</div>
</div>
</footer>