src/DcSiteBundle/Resources/views/Mazda/Accessories/accessories-page.html.twig line 1

Open in your IDE?
  1. {% extends '@DcSite/Mazda/template.html.twig' %}
  2. {% block head %}
  3.     <link rel="stylesheet" type="text/css" href="/dist/{{ MODE }}/dcsite/mazda/css/mazdaAccessoriesPage.css?{{ VERSION }}">
  4. {% endblock %}
  5. {% block seo %}
  6.     {% include '@DcSiteBundle/Modules/acessories/module/block-seo.html.twig' %}
  7. {% endblock seo %}
  8. {% block ogtagDynamic %}
  9.     {% include '@DcSiteBundle/Modules/acessories/module/og-tag-dnamic.htm.twig' %}
  10. {% endblock %}
  11. {% block ogtagDynamicImage %}
  12.     <meta property="og:image" content="{{ sonata_path(accessory.image , 'reference') }}"/>
  13. {% endblock %}
  14. {% block canonical %}
  15.     <link rel="canonical" href="{{ url(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}"/>
  16. {% endblock %}
  17. {% block content %}
  18.     <section class="breadcrumbs__new">
  19.         {% set contentId = 1 %}
  20.         <div class="container">
  21.             <ol class="global_breadcrumbs__new" itemscope itemtype="https://schema.org/BreadcrumbList">
  22.                 <li class="marker__none" itemprop="itemListElement" itemscope
  23.                     itemtype="https://schema.org/ListItem">
  24.                     <a itemprop="item" href="{{ path('mazda_homepage') }}">
  25.                         <span class="breadcrumbs__link" itemprop="name">MAZDA</span></a>
  26.                     <meta itemprop="position" content="{{ contentId }}"/>
  27.                 </li>
  28.                 {% for item in breadcrumbs %}
  29.                     {% set contentId = contentId + 1 %}
  30.                     <div class="arrow-bcs"> ❯</div>
  31.                     <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  32.                         itemtype="https://schema.org/ListItem">
  33.                         {% if item.parent is null %}
  34.                             <a itemprop="item" href="{{ path('shop_accessory_catalog') }}">
  35.                             <span class="breadcrumbs__link"
  36.                                   itemprop="name">{{ item.title(app.request.locale) }}</span>
  37.                             </a>
  38.                         {% else %}
  39.                             <a itemprop="item" href="{{ path('shop_accessory_category', {categoryUrl:item.url}) }}">
  40.                             <span class="breadcrumbs__link"
  41.                                   itemprop="name">{{ item.title(app.request.locale) }}</span></a>
  42.                         {% endif %}
  43.                         <meta itemprop="position" content="{{ contentId }}"/>
  44.                     </li>
  45.                 {% endfor %}
  46.                 {% set contentId = contentId + 1 %}
  47.                 <div class="arrow-bcs"> ❯</div>
  48.                 <li itemprop="item" class="marker__none" itemprop="itemListElement" itemscope
  49.                     itemtype="https://schema.org/ListItem">
  50.                     <span style="color: #ABABAB;" class="breadcrumbs__link" itemprop="name">{{ accessory.title }}</span>
  51.                     <meta itemprop="position" content="{{ contentId }}"/>
  52.                 </li>
  53.             </ol>
  54.         </div>
  55.     </section>
  56.     {% include '@DcSiteBundle/Modules/acessories/acessories-product.html.twig' %}
  57. {% endblock %}
  58. {% block script %}
  59.     <script src="/dist/{{ MODE }}/dcsite/mazda/js/mazdaAccessoriesPage.js?{{ VERSION }}"></script>
  60.     <script>
  61.         $(() => {
  62.             window.initAccessoriesProduct({
  63.                 initUrl: '{{ path('base_accessories_vs') }}',
  64.                 addReviewUrl: '{{ path('base_review_init') }}',
  65.                 addAccessoryToBasketUrl: '{{ path('my_basket_add_accessory') }}',
  66.                 basketUrl: '{{ path('mazda_basket') }}',
  67.                 locale: '{{ app.request.locale }}',
  68.                 accessoryId: {{ accessory.id }},
  69.                 dealerId: {{ dealer.id }},
  70.                 review_count: {{ accessory.review.count }},
  71.                 review_avg: {{ accessory.review.avg }},
  72.                 accessory: {{ accessory|json_encode|raw }},
  73.                 secondCategory: "{{ breadcrumbs[1].titleUa }}",
  74.                 brand: "{{ dealer.brand }}",
  75.             });
  76.         });
  77.     </script>
  78. {% endblock %}