custom/plugins/TcinnThemeWareModern/src/Resources/views/storefront/element/cms-element-product-listing.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/element/cms-element-product-listing.html.twig' %}
  2. {# ThemeWare® HC-Architecture® ready #}
  3. {# ---------------- START: SET TEMPLATE VARS ---------------- #}
  4. {# ThemeWare: Set theme variables #}
  5. {% set twtListingBoxLayout = element.fieldConfig.elements.boxLayout.value %}
  6. {% if twtListingBoxLayout == 'standard' %}
  7.     {# ThemeWare: Layout type "Standard" #}
  8.     {% set twtListingColumnCountLg = theme_config('twt-listing-column-count-lg') %}
  9.     {% set twtListingColumnCountMd = theme_config('twt-listing-column-count-md') %}
  10.     {% set twtListingColumnCountSidebarLg = theme_config('twt-listing-column-count-sidebar-lg') %}
  11.     {% set twtListingColumnCountSidebarMd = theme_config('twt-listing-column-count-sidebar-md') %}
  12.     {% set twtListingColumnCountSidebarSm = theme_config('twt-listing-column-count-sidebar-sm') %}
  13.     {% set twtListingColumnCountSidebarXl = theme_config('twt-listing-column-count-sidebar-xl') %}
  14.     {% set twtListingColumnCountSidebarXs = theme_config('twt-listing-column-count-sidebar-xs') %}
  15.     {% set twtListingColumnCountSm = theme_config('twt-listing-column-count-sm') %}
  16.     {% set twtListingColumnCountXl = theme_config('twt-listing-column-count-xl') %}
  17.     {% set twtListingColumnCountXs = theme_config('twt-listing-column-count-xs') %}
  18. {% elseif twtListingBoxLayout == 'image' %}
  19.     {# ThemeWare: Layout type "Big image" #}
  20.     {% set twtListingColumnCountLg = theme_config('twt-listing-column-count-lg-image') %}
  21.     {% set twtListingColumnCountMd = theme_config('twt-listing-column-count-md-image') %}
  22.     {% set twtListingColumnCountSidebarLg = theme_config('twt-listing-column-count-sidebar-lg-image') %}
  23.     {% set twtListingColumnCountSidebarMd = theme_config('twt-listing-column-count-sidebar-md-image') %}
  24.     {% set twtListingColumnCountSidebarSm = theme_config('twt-listing-column-count-sidebar-sm-image') %}
  25.     {% set twtListingColumnCountSidebarXl = theme_config('twt-listing-column-count-sidebar-xl-image') %}
  26.     {% set twtListingColumnCountSidebarXs = theme_config('twt-listing-column-count-sidebar-xs-image') %}
  27.     {% set twtListingColumnCountSm = theme_config('twt-listing-column-count-sm-image') %}
  28.     {% set twtListingColumnCountXl = theme_config('twt-listing-column-count-xl-image') %}
  29.     {% set twtListingColumnCountXs = theme_config('twt-listing-column-count-xs-image') %}
  30. {% elseif twtListingBoxLayout == 'minimal' %}
  31.     {# ThemeWare: Layout type "Minimal content" #}
  32.     {% set twtListingColumnCountLg = theme_config('twt-listing-column-count-lg-minimal') %}
  33.     {% set twtListingColumnCountMd = theme_config('twt-listing-column-count-md-minimal') %}
  34.     {% set twtListingColumnCountSidebarLg = theme_config('twt-listing-column-count-sidebar-lg-minimal') %}
  35.     {% set twtListingColumnCountSidebarMd = theme_config('twt-listing-column-count-sidebar-md-minimal') %}
  36.     {% set twtListingColumnCountSidebarSm = theme_config('twt-listing-column-count-sidebar-sm-minimal') %}
  37.     {% set twtListingColumnCountSidebarXl = theme_config('twt-listing-column-count-sidebar-xl-minimal') %}
  38.     {% set twtListingColumnCountSidebarXs = theme_config('twt-listing-column-count-sidebar-xs-minimal') %}
  39.     {% set twtListingColumnCountSm = theme_config('twt-listing-column-count-sm-minimal') %}
  40.     {% set twtListingColumnCountXl = theme_config('twt-listing-column-count-xl-minimal') %}
  41.     {% set twtListingColumnCountXs = theme_config('twt-listing-column-count-xs-minimal') %}
  42. {% else %}
  43.     {# Fallback: Shopware default values #}
  44.     {% set twtListingColumnCountLg = 4 %}
  45.     {% set twtListingColumnCountMd = 6 %}
  46.     {% set twtListingColumnCountSidebarLg = 6 %}
  47.     {% set twtListingColumnCountSidebarMd = 6 %}
  48.     {% set twtListingColumnCountSidebarSm = 6 %}
  49.     {% set twtListingColumnCountSidebarXl = 4 %}
  50.     {% set twtListingColumnCountSidebarXs = 12 %}
  51.     {% set twtListingColumnCountSm = 6 %}
  52.     {% set twtListingColumnCountXl = 3 %}
  53.     {% set twtListingColumnCountXs = 12 %}
  54. {% endif %}
  55. {# ---------------- END: SET TEMPLATE VARS ---------------- #}
  56. {# ThemeWare: Adjustments on the listing wrapper #}
  57. {% block element_product_listing_wrapper %}
  58.     {# ThemeWare: Spaltenanzahl definieren. #}
  59.     {% set listingColumns = 'col-'~ twtListingColumnCountXs ~' col-sm-'~ twtListingColumnCountSm ~' col-md-'~ twtListingColumnCountMd ~' col-lg-'~ twtListingColumnCountLg ~' col-xl-'~ twtListingColumnCountXl %}
  60.     {# ThemeWare: Spaltenanzahl mit aktiver Sidebar definieren. #}
  61.     {% if section and section.type == 'sidebar' %}
  62.         {% set listingColumns = 'col-'~ twtListingColumnCountSidebarXs ~' col-sm-'~ twtListingColumnCountSidebarSm ~' col-md-'~ twtListingColumnCountSidebarMd ~' col-lg-'~ twtListingColumnCountSidebarLg ~' col-xl-'~ twtListingColumnCountSidebarXl %}
  63.     {% endif %}
  64.     {# TODO: Bildgrößen passend zu Spaltenanzahl anpassen... #}
  65.     {# Default block #}
  66.     {{ parent() }}
  67. {% endblock %}