templates/website/product/product-category-section.html.twig line 1

Open in your IDE?
  1. {% from 'utils.html.twig' import imgUpload %}
  2. {% if productCategories|length > 0 %}
  3.     {% set visibles = 10 %}
  4.     <section 
  5.         class="pag-sec {% if section is defined and section.background %} sec-bg-alt {% endif %}">
  6.         <div id="categories-container" class="container" data-status="principal">
  7.             <header class="tit-sec tx-centro">
  8.                 <h2>{{ getLanguage('main_categories', 'home') }}</h2>
  9.             </header>
  10.             <div class="nuvem-tags">
  11.                 {% for productCategory in productCategories %}
  12.                     <a href="{{ path('productListCategory', { type: 'produtos', slug: productCategory.slug }) }}" class="tag{{ (productCategory.icon)? ' icon' : ' txt' }}">
  13.                         {% if productCategory.icon %}
  14.                             {{ imgUpload(productCategory.icon, enum('AbstractEnum::PATH_OTHERS'), 'category-icon', productCategory.category) }}
  15.                         {% endif %}
  16.                         {{ productCategory.category }}
  17.                     </a>
  18.                 {% endfor %}
  19.             </div>
  20.             <footer>
  21.                 {% if productCategories|length > visibles %}
  22.                     <button id="btn-categories" class="btn-ver">
  23.                         <span class="txt-show">{{ getLanguage('see_all', 'home') }}</span>
  24.                         <span class="txt-hide">{{ getLanguage('see_main', 'home') }}</span>
  25.                     </button>
  26.                 {% endif %}
  27.             </footer>
  28.         </div>
  29.     </section>
  30. {% endif %}