{% block fourtwosix_footer_advertising %}
{% set fts_footer_global_active = config('FourtwosixThemeExtension.config.ftsFooterActive') ?: false %}
{% set fts_footer_global_horizontal = config('FourtwosixThemeExtension.config.ftsFooterHorizontal') ?: false %}
{% set fts_footer_1_active = config('FourtwosixThemeExtension.config.ftsFooter1Active') ?: false %}
{% set fts_footer_2_active = config('FourtwosixThemeExtension.config.ftsFooter2Active') ?: false %}
{% if fts_footer_global_active %}
{% if fts_footer_global_horizontal %}
{% set fts_col_xl_class ='col-lg-12' %}
{% else %}
{% set fts_col_xl_class ='col-lg-inherit' %}
{% endif %}
{# Common with Zenit footer #}
<div class="col-md-6 {{ fts_col_xl_class }} order-1 footer-column js-footer-column footer-newsletter-column footer-newsletter {{ newsletterFooterLogoClass }}">
{% if fts_footer_1_active and fts_footer_2_active %}
{% set fts_layout_mode = constant('FourtwosixThemeExtension\\FourtwosixThemeExtension::FTS_LAYOUT_MODE_SPLIT') %}
{% elseif not fts_footer_1_active and not fts_footer_2_active %}
{% set fts_layout_mode = constant('FourtwosixThemeExtension\\FourtwosixThemeExtension::FTS_LAYOUT_MODE_EMPTY') %}
{% else %}
{% set fts_layout_mode = constant('FourtwosixThemeExtension\\FourtwosixThemeExtension::FTS_LAYOUT_MODE_STANDARD') %}
{% endif %}
<div class="row h-100">
{# If both disabled do not show anything #}
{% if fts_layout_mode != constant('FourtwosixThemeExtension\\FourtwosixThemeExtension::FTS_LAYOUT_MODE_EMPTY') %}
{# Show first advertising box #}
{% if fts_footer_1_active %}
{% sw_include '@FourtwosixThemeExtension/storefront/layout/footer/fts-footer-advertising-item.html.twig' with {
fts_footer_h1_snippet: 'fts.footer_1.h1_snippet',
fts_footer_h1_color: config('FourtwosixThemeExtension.config.ftsFooter1H1Color'),
fts_footer_h2_snippet: 'fts.footer_1.h2_snippet',
fts_footer_h2_color: config('FourtwosixThemeExtension.config.ftsFooter1H2Color'),
fts_footer_image: config('FourtwosixThemeExtension.config.ftsFooter1Mmedia'),
fts_footer_link: 'fts.footer_1.link',
fts_layout_direction : fts_footer_global_horizontal,
fts_layout_mode : fts_layout_mode,
} %}
{% endif %}
{# Show second advertising box #}
{% if fts_footer_2_active %}
{% sw_include '@FourtwosixThemeExtension/storefront/layout/footer/fts-footer-advertising-item.html.twig' with {
fts_footer_h1_snippet: 'fts.footer_2.h1_snippet',
fts_footer_h1_color: config('FourtwosixThemeExtension.config.ftsFooter2H1Color'),
fts_footer_h2_snippet: 'fts.footer_2.h2_snippet',
fts_footer_h2_color: config('FourtwosixThemeExtension.config.ftsFooter2H2Color'),
fts_footer_image: config('FourtwosixThemeExtension.config.ftsFooter2Mmedia'),
fts_footer_link: 'fts.footer_2.link',
fts_layout_direction : fts_footer_global_horizontal,
fts_layout_mode : fts_layout_mode,
} %}
{% endif %}
{% endif %}
</div>
</div>
{% endif %}
{% endblock %}