templates/front/catalog/discount/universe.html.twig line 1

Open in your IDE?
  1. {% extends 'front/front.html.twig' %}
  2. {% block bodyClass %}universe category{% endblock %}
  3. {% block metas %}
  4. <title>{{ categoryDescription.headTitleTag }}</title>
  5. <meta name="description" content="{{ categoryDescription.headDescTag }}">
  6. <link rel="canonical" href="{{ url('universe',{id:category.id, url:category.url}) }}" />
  7. {% endblock %}
  8. {% block structuredData %}
  9. {% if category.name %}
  10. <script type="application/ld+json">
  11. {
  12. "@context": "https://schema.org",
  13. "@type": "BreadcrumbList",
  14. "itemListElement":
  15. [
  16. {
  17. "@type": "ListItem",
  18. "position": 1,
  19. "item":
  20. {
  21. "@id": "{{ url('index') }}",
  22. "name": "{% trans %}Vivog | Matériel pour les toiletteurs et éleveurs{% endtrans %}"
  23. }
  24. },
  25. {
  26. "@type": "ListItem",
  27. "position": 2,
  28. "item":
  29. {
  30. "@id": "{{ url('universe',{url:category.url,id:category.id}) }}",
  31. "name": "{{ category.name }}"
  32. }
  33. }
  34. ]
  35. }
  36. </script>
  37. {% endif %}
  38. {% endblock %}
  39. {% block featured %}{% endblock %}
  40. {% block breadcrumbs %}
  41. {% include 'front/layout/breadcrumbs.html.twig' with {category:category} %}
  42. {% endblock %}
  43. {% block content %}
  44. <div class="ctn category-view">
  45. {% if is_granted('ROLE_ADMIN') %}
  46. <div class="admin-tools">
  47. <a href="{{ path('admin_category_edit',{id:category.id}) }}" class="admin-update" target="_blank">modifier la catégorie</a>
  48. </div>
  49. {% endif %}
  50. <h1>{{ category.name }}</h1>
  51. {% if discountPages %}
  52. <aside>
  53. <nav class="tree">
  54. <a class="universe">{% trans %}Toutes nos Promos{% endtrans %}</a>
  55. <ul class="discounts">
  56. {% for discountPage in discountPages %}
  57. <li><a href="{{ path('discount', {id:discountPage.id, url: discountPage.url}) }}">{{ discountPage.title }}</a></li>
  58. {% endfor %}
  59. </ul>
  60. </nav>
  61. </aside>
  62. {% endif %}
  63. <div {% if discountPages|length > 0 %}class="center"{% endif %}>
  64. <div class="product-ctn">
  65. {% include 'front/catalog/product/list.html.twig' with { products:products, productTitleTag:'h2', listClass:(discountPages|length > 0 ? '':'wide-list'), filterUrl:path('universe', {id:category.id, url:category.url, page:page}) } %}
  66. </div>
  67. </div>
  68. </div>
  69. {{ render(controller(
  70. 'App\\Controller\\Front\\Modules\\SeenProductsController::block',
  71. { 'request': app.request }
  72. )) }}
  73. <div class="ctn">
  74. {% if categoryDescription.description %}
  75. <div class="seo">
  76. <div class="title-ctn">
  77. <h2 class="title">{% trans %}Tout savoir sur{% endtrans %} "{{ category.name }}"</h2>
  78. </div>
  79. <div class="description">{{ categoryDescription.description|raw }}</div>
  80. </div>
  81. {% endif %}
  82. {% if categoryDescription.tags %}
  83. <div class="module-categories tags">
  84. <div class="title-ctn">
  85. <div class="title">{% trans %}Nos catégories{% endtrans %}</div>
  86. <hr>
  87. </div>
  88. <div class="content">
  89. {{ categoryDescription.tags|raw }}
  90. </div>
  91. </div>
  92. {% endif %}
  93. <div class="footer-spacer"></div>
  94. </div>
  95. {% endblock %}
  96. {% block javascripts %}
  97. <script>
  98. $('#list-sort').change(function(){
  99. $(this).closest('form').submit();
  100. });
  101. </script>
  102. {% endblock %}