{% extends 'base.html.twig' %} {% block title %} {% if channel is defined %} {{ channel.channelName }} {% endif %} {% endblock %} {% block meta %} {% if channel is defined %} {% if channel.banner is not empty %} {% endif %} {% if channel.ecomFavicon is not empty %} {% endif %} {% endif %} {% endblock %} {% block stylesheets %} {% if channel is defined and channel.ecomTemplate is not empty %} {% else %} {% endif %} {# #} {# #} {% if channel is defined and channel.ecomColorForText is not empty %} {% endif %} {% if channel is defined and channel.ecomTemplate == 'standard' %} {% if channel.ecomColorBackground is not empty %} {% endif %} {% if channel.ecomColor is not empty %} {% set color = channel.ecomColor %} {% set colorText = channel.ecomColorForText %} {% endif %} {% if channel.ecomColorBoxes is not empty %} {% endif %} {% if channel.ecomColorBackgroundText is not empty %} {% endif %} {% endif %} {% if channel is defined and channel.ecomTemplate == 'niclas' %} {% endif %} {% endblock %} {% macro recursiveCategory(category) %} {% if category.type == 'link' %} {% set url = category.url %} {% else %} {% set url = path('ecom_category', {'channelEcomId': app.request.get('channelEcomId'), 'categorySlug': category.categorySlug}) %} {% endif %}
  • {{ category.textToShow }} {% set children = category.children %} {% if children is not empty %} {% endif %}
  • {% endmacro %} {% block body %} {% set mainMenuHtml = '' %} {% if mainMenu is defined and mainMenu is not empty %} {% for item in mainMenu %} {% set mainMenuHtml = mainMenuHtml ~ _self.recursiveCategory(item) %} {% endfor %} {% endif %} {% set mobileLeftMenuHtml = '' %} {% if mobileLeftMenu is defined and mobileLeftMenu is not empty %} {% for item in mobileLeftMenu %} {% set mobileLeftMenuHtml = mobileLeftMenuHtml ~ _self.recursiveCategory(item) %} {% endfor %} {% endif %} {% set rightMenuHtml = '' %} {% if rightMenu is defined and rightMenu is not empty %} {% for item in rightMenu %} {% set rightMenuHtml = rightMenuHtml ~ _self.recursiveCategory(item) %} {% endfor %} {% endif %} {% set template = constant('App\\Entity\\Channel::ECOM_TEMPLATE_STANDARD') %} {% if channel is defined and channel is not empty %} {% set template = channel.ecomTemplate %} {% endif %} {{ include('webshop/template/' ~ template ~'/header.html.twig', {'rightMenuHtml': rightMenuHtml}) }} {% block banner %}{% endblock %}
    {% for message in app.flashes('success') %} {% endfor %} {% for message in app.flashes('error') %} {% endfor %} {% if app.request.attributes.get('_route') != 'ecom_index' %} {% endif %} {% block content %}{% endblock %}
    {{ include('webshop/template/' ~ template ~'/footer.html.twig') }} {{ include('webshop/__cart_modal.html.twig') }} {% endblock %} {% block javascripts %} {% endblock %}