templates/Shop/list.html.twig line 1

Open in your IDE?
  1. {% extends 'product.html.twig' %}
  2. {% block content %}
  3. <script src="/website/static/js/productfilters.js" defer></script>
  4.   
  5.   
  6.     
  7.     <!-- Added Comment- -->
  8.     <div class="breadcrumb-block">
  9.         <div class="container">
  10.           <!-- breadcrumb of the page -->
  11.           <ul class="breadcrumb">
  12.               <li><a href="/{{ locale }}" class="home">{{ "espirits.header.home"|trans }}</a></li>
  13.             
  14.               <li><a href="{{ editmode or preview ? '' : path('product-landing',{ prefix: locale }, false) }}">{{ "espirits.header.our-products"| trans }}</a></li>
  15.               {% set parenturl = '' %}
  16.               {% if category is defined and category is not empty %}
  17.                     {% set parentcategory = category.getParent() %}
  18.                     {% set heading = category.getName() %}
  19.                     {% if parentcategory and parentcategory.getType() == "object" and parentcategory.getClassname() == "CategoryAlcoholType" %}
  20.                           {% set parenturl = parentcategory.getDetailUrl({"rootCategory" : parentcategory, "document" : document}) %}
  21.                         
  22.                           <li><a href="{{ parenturl }}">{{ parentcategory.getName() }}</a></li>
  23.                     {% endif %}
  24.               {% elseif BrandName is defined and BrandName is not empty and products|length != 0 %}
  25.                     {% set heading = BrandName %}
  26.                     <li><a href="{{ parenturl }}">{{ BrandName }}</a></li>
  27.               {% else %}
  28.                     {% set heading = "espirits.header.our-products"|trans %}             
  29.               {% endif %}
  30.                   <li class="active">{{ category is defined and category is not empty ? category.getName() : "" }}</li>
  31.           </ul>
  32.         </div>
  33.     </div>
  34.     <div class="container">
  35.     {% if products|length == 0 %}
  36.         <div class="heading-holder">
  37.           <h1>{{ "espirits.search.results"|trans }}</h1>
  38.         </div>
  39.         <h3>{{ "shop.empty-result"|trans }}</h3>
  40.     {% else %}
  41.         <div class="heading-holder">
  42.           <!-- main heading of the page -->
  43.           <h1>{{ heading }}</h1>
  44.         </div>
  45.         <div class="row">
  46.           <div class="col-sm-4 col-md-3">
  47.             <div class="filter-block">
  48.               <a href="#" class="filter-opener">filter products</a>
  49.               <div class="filter-slide">
  50.                 <!-- filter form of the page -->
  51.                 <form class="filter-form" id="js_filterfield" action="" method="get">
  52.           
  53.                      {% if filterDefinitionObject.getFilters() %}
  54.                         <div class="widget">
  55.                             {% for filter in filterDefinitionObject.getFilters() %}
  56.                                 {% if filter.getLabel() != 'Country Availability' %}
  57.                                       {{ filterService.getFilterFrontend(filter, products, currentFilter)|raw }}
  58.                                 {% endif %}
  59.                             {% endfor %}
  60.                         </div>
  61.                     {% endif %}
  62.                     {% if search is defined and search is not empty %}
  63.                         <input name="search" value="{{ search }}" type="hidden"/>
  64.                     {% endif %}
  65.                 </form>
  66.               </div>
  67.             </div>
  68.           </div>
  69.           <div class="col-sm-8 col-md-9">
  70.              {% include 'Shop/includes/pagination.html.twig' %}
  71.             
  72.             
  73.             <div class="product-list same-height-holder">
  74.               {% include 'Shop/list/products.html.twig' with {'products' : products, 'locale' : locale, 'country' : country, 'lastlogin' : lastlogin, 'preview' : preview, 'editmode' : editmode} %} 
  75.             </div>
  76.             
  77.             {% include 'Shop/includes/pagination.html.twig' %}
  78.           </div>
  79.         </div>
  80.       </div>
  81.     {% endif %}
  82.     </div>
  83. {% endblock %}