custom/plugins/WabsBannerNotifications/src/Resources/views/storefront/base.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/base.html.twig' %}
  2. {% set active = page.header.extensions.bannerNotification['active'] %}
  3. {# Checks if plugin is active and only displays banner in given timespan #}
  4. {% if active %}
  5.     {% set position = page.header.extensions.bannerNotification['position'] %}
  6. {% endif %}
  7. {# Place banner notification above header #}
  8. {% block base_header %}
  9.     {% if position == "top" %}
  10.         {% sw_include '@Storefront/storefront/component/wabs-banner-notification.html.twig' ignore missing %}
  11.     {% endif %}
  12.     {{ parent() }}
  13. {% endblock %}
  14. {# Place banner notification below navigation #}
  15. {% block base_navigation %}
  16.     {{ parent() }}
  17.     {% if position == "nav" %}
  18.         {% sw_include '@Storefront/storefront/component/wabs-banner-notification.html.twig' ignore missing %}
  19.     {% endif %}
  20. {% endblock %}
  21. {# Place banner notification above or below footer #}
  22. {% block base_footer %}
  23.     {% if position == "footer" %}
  24.         {% sw_include '@Storefront/storefront/component/wabs-banner-notification.html.twig' ignore missing %}
  25.     {{ parent() }}
  26.     {% elseif position == "bottom" %}
  27.         {{ parent() }}
  28.         {% sw_include '@Storefront/storefront/component/wabs-banner-notification.html.twig' ignore missing %}
  29.     {% else %}
  30.         {{ parent() }}
  31.     {% endif %}
  32. {% endblock %}