templates/front/product/product_list.html.twig line 1

Open in your IDE?
  1. {% extends 'base_front.html.twig' %}
  2. {% block body %}
  3.     <section id="products">
  4.         <div class="container-right container-video position-relative bg-black-transparent p-5">
  5.             <h2 class="black mb-3">Products <br><span>& services</span></h2>
  6.             <div class="tabs-page mt-5">
  7.                 <div class="row col-md-12">
  8.                     {% for category in allCategories %}
  9.                         {% if category.subcategories is not empty %}
  10.                             {% if not loop.first %}
  11.                                 <div class="separate"></div>
  12.                             {% endif %}
  13.                             <a href="{{ path('front_product_list', {'category_slug' : category.slug, 'subcategory_slug': category.subcategories.0.slug}) }}" {% if currentCategory.id == category.id %}class="active"{% endif %}>
  14.                                 <h3>{{ category.name }}</h3>
  15.                             </a>
  16.                         {% endif %}
  17.                     {% endfor %}
  18.                 </div>
  19.             </div>
  20.             <div class="col-md-12 mt-5 tabs-services">
  21.                 <ul class="nav nav-pills mb-3" id="pills-tab" role="tablist">
  22.                     {% for subCategory in currentCategory.subCategories %}
  23.                         <li class="nav-item" role="presentation">
  24.                             <button class="nav-link {% if subCategory.id == currentSubCategory.id %}active{% endif %}"
  25.                                     id="pills-home-tab"
  26.                                     data-toggle="pill"
  27.                                     data-target="#{{ subCategory.slug }}"
  28.                                     type="button"
  29.                                     role="tab"
  30.                                     aria-controls="pills-home"
  31.                                     aria-selected="{% if subCategory.id == currentSubCategory.id %}true{% else %}false{% endif %}">{{ subCategory.name }}</button>
  32.                         </li>
  33.                     {% endfor %}
  34.                 </ul>
  35.                 <div class="tab-content" id="pills-tabContent">
  36.                     {% for subCategory in currentCategory.subCategories %}
  37.                         <div class="tab-pane fade {% if subCategory.id == currentSubCategory.id %}show active{% endif %}" id="{{ subCategory.slug }}" role="tabpanel" aria-labelledby="pills-home-tab">
  38.                         <div class="row col-md-12 mt-5 align-items-start">
  39.                             <div class="col-md-12 col-lg-12 col-xl-5 service-description" style="background-color:{{ subCategory.category.color }};">
  40.                                 <h3>DESCRIPTION</h3>
  41.                                 <p class="white">{{ subCategory.description }}</p>
  42.                             </div>
  43.                             <div class="col-lg-12 col-xl-7 service-list pt-4">
  44.                                 <div class="row">
  45.                                     {% for page in subCategory.productPages %}
  46.                                         <div class="col-lg-4 col-xl-4 mt-3">
  47.                                             <a href="{{ path('front_product_page', {'category_slug' : page.subcategory.category.slug, 'subcategory_slug': page.subcategory.slug, 'slug_page': page.slug}) }}">
  48.                                                 <div class="bg-white black square"><span>{{ page.name }}</div>
  49.                                             </a>
  50.                                         </div>
  51.                                     {% endfor %}
  52.                                 </div>
  53.                             </div>
  54.                         </div>
  55.                     </div>
  56.                     {% endfor %}
  57.                 </div>
  58.             </div>
  59.         </div>
  60.     </section>
  61. {% endblock %}