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

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