diff --git a/src/Bundle/ChillMainBundle/Resources/views/Layout/_top_banner.html.twig b/src/Bundle/ChillMainBundle/Resources/views/Layout/_top_banner.html.twig new file mode 100644 index 000000000..a7a74c1f8 --- /dev/null +++ b/src/Bundle/ChillMainBundle/Resources/views/Layout/_top_banner.html.twig @@ -0,0 +1,17 @@ +{% if chill_main_config.top_banner is defined and chill_main_config.top_banner.text is defined %} + {% set banner_text = '' %} + {% set current_locale = app.request.locale %} + + {% if chill_main_config.top_banner.text[current_locale] is defined %} + {% set banner_text = chill_main_config.top_banner.text[nl] %} + {% else %} + {% set banner_text = chill_main_config.top_banner.text|first %} + {% endif %} + + {% if banner_text %} +
+ {{ banner_text }} +
+ {% endif %} +{% endif %} diff --git a/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig b/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig index 343c12eea..0ff39c8d9 100644 --- a/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig +++ b/src/Bundle/ChillMainBundle/Resources/views/layout.html.twig @@ -26,6 +26,10 @@ + {% if chill_main_config.top_banner is defined and chill_main_config.top_banner.visible is true %} + {{ include('@ChillMain/Layout/_top_banner.html.twig') }} + {% endif %} + {% if responsive_debug is defined and responsive_debug == 1 %} {{ include('@ChillMain/Layout/_debug.html.twig') }} {% endif %}