templates/front/catalog/category/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 universe-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 category.children|length %}
  52. <div class="category-buttons">
  53. {% for child in category.children %}
  54. <a href="{{ path('category',{id:child.id,'url':child.url}) }}" class="button">{{ child.name }}</a>
  55. {% endfor %}
  56. </div>
  57. {# <div class="subcategories">
  58. {% for child in category.children %}
  59. <div class="title-ctn">
  60. <h2 class="title">{{ child.name }} <a href="{{ path('category',{id:child.id,'url':child.url}) }}">{% trans %}tout voir{% endtrans %}</a></h2>
  61. <hr>
  62. </div>
  63. {% include 'front/catalog/product/carousel.html.twig' with { products:attribute(subcategories,child.id), productTitleTag:'h3' }%}
  64. {% endfor %}
  65. </div>#}
  66. {{ render(controller(
  67. 'App\\Controller\\Front\\CategoryController::subcategories', {request:app.request, category:category}
  68. )) }}
  69. {% endif %}
  70. </div>
  71. {{ render(controller(
  72. 'App\\Controller\\Front\\Modules\\SeenProductsController::block',
  73. { 'request': app.request }
  74. )) }}
  75. <div class="ctn">
  76. {% if categoryDescription.description %}
  77. <div class="seo">
  78. <div class="title-ctn">
  79. <h2 class="title">{% trans %}Tout savoir sur{% endtrans %} "{{ category.name }}"</h2>
  80. </div>
  81. <div class="description">{{ categoryDescription.description|raw }}</div>
  82. </div>
  83. {% endif %}
  84. {% if categoryDescription.tags %}
  85. <div class="module-categories tags">
  86. <div class="title-ctn">
  87. <div class="title">{% trans %}Nos catégories{% endtrans %}</div>
  88. <hr>
  89. </div>
  90. <div class="content">
  91. {{ categoryDescription.tags|raw }}
  92. </div>
  93. </div>
  94. {% endif %}
  95. <div class="footer-spacer"></div>
  96. </div>
  97. {% endblock %}