{% sw_extends '@Storefront/storefront/section/cms-section-sidebar.html.twig' %} {# ---------------- START: SET TEMPLATE VARS ---------------- #} {# ThemeWare: Set theme variables #} {% set twtSidebarElement1 = theme_config('twt-sidebar-element-1') %} {% set twtSidebarElement1Toggle = theme_config('twt-sidebar-element-1-toggle') %} {% set twtSidebarElement1Position = theme_config('twt-sidebar-element-1-position') %} {% set twtSidebarElement2 = theme_config('twt-sidebar-element-2') %} {% set twtSidebarElement2Toggle = theme_config('twt-sidebar-element-2-toggle') %} {% set twtSidebarElement2Position = theme_config('twt-sidebar-element-2-position') %} {% set twtSidebarElement3 = theme_config('twt-sidebar-element-3') %} {% set twtSidebarElement3Toggle = theme_config('twt-sidebar-element-3-toggle') %} {% set twtSidebarElement3Position = theme_config('twt-sidebar-element-3-position') %} {# ---------------- END: SET TEMPLATE VARS ---------------- #} {# TODO: Add configuration #hc-compatibility #} {# TODO: Change display with class instaed with CSS #} {% block section_sidebar_content %} {# ThemeWare: Create Sidebar-Elements #} {% set twtSidebarElements = {} %} {# ThemeWare: Sidebar-Element 1 #} {% if twtSidebarElement1 != 'none' %} {% set twtSidebarElements = twtSidebarElements|merge({ 1: { elementid: 1, element: twtSidebarElement1, toggle: twtSidebarElement1Toggle, position: twtSidebarElement1Position } }) %} {% endif %} {# ThemeWare: Sidebar-Element 2 #} {% if twtSidebarElement2 != 'none' %} {% set twtSidebarElements = twtSidebarElements|merge({ 2: { elementid: 2, element: twtSidebarElement2, toggle: twtSidebarElement2Toggle, position: twtSidebarElement2Position } }) %} {% endif %} {# ThemeWare: Sidebar-Element 3 #} {% if twtSidebarElement3 != 'none' %} {% set twtSidebarElements = twtSidebarElements|merge({ 3: { elementid: 3, element: twtSidebarElement3, toggle: twtSidebarElement3Toggle, position: twtSidebarElement3Position } }) %} {% endif %}
{% endblock %}