templates/product/item/index.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}{{ product.title }}{% endblock %}
  3. {% block body %}
  4. <main>
  5.     <section class="komili-home-hero owl-carousel">
  6.         <div class="hero-item">
  7.             <img src="{{ asset('img/product-hero.jpg') }}" alt="">
  8.         </div>
  9.     </section>
  10.     <section class="komili-home-products cat-products">
  11.         <div class="komili-wrapper">
  12.             <h1 class="text-center bold text-color-p mb-32 h2">{{ product.title }}</h1>
  13.             <div class="komili-cat-products">
  14.                 {% for item in itemPaginator.result %}
  15.                     <div class="komili-cat-products-item">
  16.                         {% if item.itemTypes|length > 0 %}
  17.                             <a href="{{ path('product_item_type', { 'categorySlug': product.slug, 'itemSlug': item.slug}) }}">
  18.                         {% else %}
  19.                                 <a href="{{ path('product_item_show', { 'categorySlug': product.slug, 'itemSlug': item.slug}) }}">
  20.                         {% endif %}
  21.                             <figure class="mb-16">
  22.                                 <img src="{{ item.image.url }}" alt={{ item.title }} width="" height="" class="m-auto" loading="lazy">
  23.                             </figure>
  24.                             <div class="text">
  25.                                 <h3 class="bold text-color-p h4">{{ item.title }}</h3>
  26.                             </div>
  27.                         </a>
  28.                     </div>
  29.                 {% endfor %}
  30.             </div>
  31.         </div>
  32.     </section>
  33.     {% for item in itemPaginator.result %}
  34.         <div itemscope itemtype="http://schema.org/Product">
  35.             <meta itemscope itemprop="mainEntityOfPage"  itemType="https://schema.org/WebPage" itemid="{{ url('product_item_show', { 'categorySlug': product.slug, 'itemSlug': item.slug}) }}"/>
  36.             <meta itemprop="headline" content="{{ item.title }}">
  37.             <h3 itemprop="author" itemscope itemtype="https://schema.org/Person">
  38.                 <meta itemprop="name" content="Komili">
  39.             </h3>
  40.             <meta itemprop="description" content="{{ item.shortContent }}"/>
  41.             <div itemprop="image" itemscope itemtype="https://schema.org/ImageObject">
  42.                 <meta itemprop="url" content="{{ item.image.url }}">
  43.             </div>
  44.             <div itemprop="publisher" itemscope itemtype="https://schema.org/Organization">
  45.                 <div itemprop="logo" itemscope itemtype="https://schema.org/ImageObject">
  46.                     <meta itemprop="url" content="{{ absolute_url('/img/komili-logo.svg') }}">
  47.                 </div>
  48.                 <meta itemprop="name" content="Komili">
  49.             </div>
  50.             <meta itemprop="datePublished" content="{{ item.createdAt|date('Y-m-d') }}T{{ item.createdAt|date('H:s') }}"/>
  51.             <meta itemprop="dateModified" content="{{ item.updatedAt|date('Y-m-d') }}T{{ item.updatedAt|date('H:s') }}"/>
  52.         </div>
  53.     {% endfor %}
  54. </main>
  55. {% endblock %}