var/cache/dev/twig/b2/b246dc4d5bae266e1a1b8236815697b8.php line 475

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\CoreExtension;
  6. use Twig\Extension\SandboxExtension;
  7. use Twig\Markup;
  8. use Twig\Sandbox\SecurityError;
  9. use Twig\Sandbox\SecurityNotAllowedTagError;
  10. use Twig\Sandbox\SecurityNotAllowedFilterError;
  11. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  12. use Twig\Source;
  13. use Twig\Template;
  14. use Twig\TemplateWrapper;
  15. /* front/catalog/category/view.html.twig */
  16. class __TwigTemplate_eb94498699fedc27e8f28e0f46184a21 extends Template
  17. {
  18. private Source $source;
  19. /**
  20. * @var array<string, Template>
  21. */
  22. private array $macros = [];
  23. public function __construct(Environment $env)
  24. {
  25. parent::__construct($env);
  26. $this->source = $this->getSourceContext();
  27. $this->blocks = [
  28. 'javascripts' => [$this, 'block_javascripts'],
  29. 'structuredData' => [$this, 'block_structuredData'],
  30. 'bodyClass' => [$this, 'block_bodyClass'],
  31. 'metas' => [$this, 'block_metas'],
  32. 'featured' => [$this, 'block_featured'],
  33. 'breadcrumbs' => [$this, 'block_breadcrumbs'],
  34. 'content' => [$this, 'block_content'],
  35. ];
  36. }
  37. protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
  38. {
  39. // line 1
  40. return "front/front.html.twig";
  41. }
  42. protected function doDisplay(array $context, array $blocks = []): iterable
  43. {
  44. $macros = $this->macros;
  45. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  46. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/category/view.html.twig"));
  47. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  48. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/category/view.html.twig"));
  49. $this->parent = $this->load("front/front.html.twig", 1);
  50. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  51. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  52. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  53. }
  54. // line 3
  55. /**
  56. * @return iterable<null|scalar|\Stringable>
  57. */
  58. public function block_javascripts(array $context, array $blocks = []): iterable
  59. {
  60. $macros = $this->macros;
  61. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  62. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  63. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  64. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
  65. // line 4
  66. yield " <script>
  67. config.categoryId = ";
  68. // line 5
  69. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 5, $this->source); })()), "id", [], "any", false, false, false, 5), "html", null, true);
  70. yield ";
  71. </script>
  72. <script src=\"";
  73. // line 7
  74. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("js/filters.js"), "html", null, true);
  75. yield "\"></script>
  76. ";
  77. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  78. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  79. yield from [];
  80. }
  81. // line 10
  82. /**
  83. * @return iterable<null|scalar|\Stringable>
  84. */
  85. public function block_structuredData(array $context, array $blocks = []): iterable
  86. {
  87. $macros = $this->macros;
  88. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  89. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "structuredData"));
  90. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  91. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "structuredData"));
  92. // line 11
  93. yield " ";
  94. $context["cpt"] = 1;
  95. // line 12
  96. yield " <script type=\"application/ld+json\">
  97. {
  98. \"@context\": \"https://schema.org\",
  99. \"@type\": \"BreadcrumbList\",
  100. \"itemListElement\":
  101. [
  102. {
  103. \"@type\": \"ListItem\",
  104. \"position\": ";
  105. // line 20
  106. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["cpt"]) || array_key_exists("cpt", $context) ? $context["cpt"] : (function () { throw new RuntimeError('Variable "cpt" does not exist.', 20, $this->source); })()), "html", null, true);
  107. yield ",
  108. \"item\":
  109. {
  110. \"@id\": \"";
  111. // line 23
  112. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("index");
  113. yield "\",
  114. \"name\": \"";
  115. // line 24
  116. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Vivog | Matériel pour les toiletteurs et éleveurs", [], "messages");
  117. yield "\"
  118. }
  119. },
  120. ";
  121. // line 27
  122. $context['_parent'] = $context;
  123. $context['_seq'] = CoreExtension::ensureTraversable((isset($context["path"]) || array_key_exists("path", $context) ? $context["path"] : (function () { throw new RuntimeError('Variable "path" does not exist.', 27, $this->source); })()));
  124. $context['loop'] = [
  125. 'parent' => $context['_parent'],
  126. 'index0' => 0,
  127. 'index' => 1,
  128. 'first' => true,
  129. ];
  130. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  131. $length = count($context['_seq']);
  132. $context['loop']['revindex0'] = $length - 1;
  133. $context['loop']['revindex'] = $length;
  134. $context['loop']['length'] = $length;
  135. $context['loop']['last'] = 1 === $length;
  136. }
  137. foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
  138. // line 28
  139. yield " ";
  140. $context["cpt"] = ((isset($context["cpt"]) || array_key_exists("cpt", $context) ? $context["cpt"] : (function () { throw new RuntimeError('Variable "cpt" does not exist.', 28, $this->source); })()) + 1);
  141. // line 29
  142. yield " {
  143. \"@type\": \"ListItem\",
  144. \"position\": ";
  145. // line 31
  146. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["cpt"]) || array_key_exists("cpt", $context) ? $context["cpt"] : (function () { throw new RuntimeError('Variable "cpt" does not exist.', 31, $this->source); })()), "html", null, true);
  147. yield ",
  148. \"item\":
  149. {
  150. ";
  151. // line 34
  152. if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 34) == 1)) {
  153. // line 35
  154. yield " \"@id\": \"";
  155. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("universe", ["url" => CoreExtension::getAttribute($this->env, $this->source, $context["p"], "url", [], "any", false, false, false, 35), "id" => CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 35)]), "html", null, true);
  156. yield "\",
  157. ";
  158. } else {
  159. // line 37
  160. yield " \"@id\": \"";
  161. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("category", ["url" => CoreExtension::getAttribute($this->env, $this->source, $context["p"], "url", [], "any", false, false, false, 37), "id" => CoreExtension::getAttribute($this->env, $this->source, $context["p"], "id", [], "any", false, false, false, 37)]), "html", null, true);
  162. yield "\",
  163. ";
  164. }
  165. // line 39
  166. yield " \"name\": \"";
  167. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, $context["p"], "name", [], "any", false, false, false, 39), "html", null, true);
  168. yield "\"
  169. }
  170. },
  171. ";
  172. ++$context['loop']['index0'];
  173. ++$context['loop']['index'];
  174. $context['loop']['first'] = false;
  175. if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
  176. --$context['loop']['revindex0'];
  177. --$context['loop']['revindex'];
  178. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  179. }
  180. }
  181. $_parent = $context['_parent'];
  182. unset($context['_seq'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
  183. $context = array_intersect_key($context, $_parent) + $_parent;
  184. // line 43
  185. yield " ";
  186. $context["cpt"] = ((isset($context["cpt"]) || array_key_exists("cpt", $context) ? $context["cpt"] : (function () { throw new RuntimeError('Variable "cpt" does not exist.', 43, $this->source); })()) + 1);
  187. // line 44
  188. yield " {
  189. \"@type\": \"ListItem\",
  190. \"position\": ";
  191. // line 46
  192. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["cpt"]) || array_key_exists("cpt", $context) ? $context["cpt"] : (function () { throw new RuntimeError('Variable "cpt" does not exist.', 46, $this->source); })()), "html", null, true);
  193. yield ",
  194. \"item\":
  195. {
  196. \"@id\": \"";
  197. // line 49
  198. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("category", ["url" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 49, $this->source); })()), "url", [], "any", false, false, false, 49), "id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 49, $this->source); })()), "id", [], "any", false, false, false, 49)]), "html", null, true);
  199. yield "\",
  200. \"name\": \"";
  201. // line 50
  202. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 50, $this->source); })()), "name", [], "any", false, false, false, 50), "html", null, true);
  203. yield "\"
  204. }
  205. }
  206. ]
  207. }
  208. </script>
  209. ";
  210. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  211. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  212. yield from [];
  213. }
  214. // line 58
  215. /**
  216. * @return iterable<null|scalar|\Stringable>
  217. */
  218. public function block_bodyClass(array $context, array $blocks = []): iterable
  219. {
  220. $macros = $this->macros;
  221. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  222. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "bodyClass"));
  223. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  224. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "bodyClass"));
  225. yield "category";
  226. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  227. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  228. yield from [];
  229. }
  230. // line 60
  231. /**
  232. * @return iterable<null|scalar|\Stringable>
  233. */
  234. public function block_metas(array $context, array $blocks = []): iterable
  235. {
  236. $macros = $this->macros;
  237. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  238. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metas"));
  239. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  240. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metas"));
  241. // line 61
  242. yield " <title>";
  243. yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["categoryDescription"]) || array_key_exists("categoryDescription", $context) ? $context["categoryDescription"] : (function () { throw new RuntimeError('Variable "categoryDescription" does not exist.', 61, $this->source); })()), "headTitleTag", [], "any", false, false, false, 61)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["categoryDescription"]) || array_key_exists("categoryDescription", $context) ? $context["categoryDescription"] : (function () { throw new RuntimeError('Variable "categoryDescription" does not exist.', 61, $this->source); })()), "headTitleTag", [], "any", false, false, false, 61), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["categoryDescription"]) || array_key_exists("categoryDescription", $context) ? $context["categoryDescription"] : (function () { throw new RuntimeError('Variable "categoryDescription" does not exist.', 61, $this->source); })()), "name", [], "any", false, false, false, 61), "html", null, true)));
  244. yield " ";
  245. if (((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 61, $this->source); })()) > 1)) {
  246. yield "(page ";
  247. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 61, $this->source); })()), "html", null, true);
  248. yield ")";
  249. }
  250. yield "</title>
  251. <meta name=\"description\" content=\"";
  252. // line 62
  253. yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["categoryDescription"]) || array_key_exists("categoryDescription", $context) ? $context["categoryDescription"] : (function () { throw new RuntimeError('Variable "categoryDescription" does not exist.', 62, $this->source); })()), "headDescTag", [], "any", false, false, false, 62)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["categoryDescription"]) || array_key_exists("categoryDescription", $context) ? $context["categoryDescription"] : (function () { throw new RuntimeError('Variable "categoryDescription" does not exist.', 62, $this->source); })()), "headDescTag", [], "any", false, false, false, 62), "html", null, true)) : ($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['App\Twig\TextExtension']->metaDescriptionFilter(CoreExtension::getAttribute($this->env, $this->source, (isset($context["categoryDescription"]) || array_key_exists("categoryDescription", $context) ? $context["categoryDescription"] : (function () { throw new RuntimeError('Variable "categoryDescription" does not exist.', 62, $this->source); })()), "description", [], "any", false, false, false, 62)), "html", null, true)));
  254. yield "\">
  255. ";
  256. // line 63
  257. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 63, $this->source); })()), "parent", [], "any", false, false, false, 63)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  258. // line 64
  259. yield " ";
  260. if (((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 64, $this->source); })()) > 1)) {
  261. // line 65
  262. yield " <link rel=\"canonical\" href=\"";
  263. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("category", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 65, $this->source); })()), "id", [], "any", false, false, false, 65), "url" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 65, $this->source); })()), "url", [], "any", false, false, false, 65), "page" => (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 65, $this->source); })())]), "html", null, true);
  264. yield "\" />
  265. ";
  266. } else {
  267. // line 67
  268. yield " <link rel=\"canonical\" href=\"";
  269. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("category", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 67, $this->source); })()), "id", [], "any", false, false, false, 67), "url" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 67, $this->source); })()), "url", [], "any", false, false, false, 67)]), "html", null, true);
  270. yield "\" />
  271. ";
  272. }
  273. // line 69
  274. yield " ";
  275. } else {
  276. // line 70
  277. yield " <link rel=\"canonical\" href=\"";
  278. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("universe", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 70, $this->source); })()), "id", [], "any", false, false, false, 70), "url" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 70, $this->source); })()), "url", [], "any", false, false, false, 70)]), "html", null, true);
  279. yield "\" />
  280. ";
  281. }
  282. // line 72
  283. yield " ";
  284. if (((isset($context["nbPages"]) || array_key_exists("nbPages", $context) ? $context["nbPages"] : (function () { throw new RuntimeError('Variable "nbPages" does not exist.', 72, $this->source); })()) > 1)) {
  285. // line 73
  286. yield " ";
  287. if (((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 73, $this->source); })()) > 2)) {
  288. // line 74
  289. yield " <link rel=\"prev\" href=\"";
  290. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("category", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 74, $this->source); })()), "id", [], "any", false, false, false, 74), "url" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 74, $this->source); })()), "url", [], "any", false, false, false, 74), "page" => ((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 74, $this->source); })()) - 1)]), "html", null, true);
  291. yield "\" />
  292. ";
  293. } elseif (( // line 75
  294. (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 75, $this->source); })()) == 2)) {
  295. // line 76
  296. yield " <link rel=\"prev\" href=\"";
  297. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("category", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 76, $this->source); })()), "id", [], "any", false, false, false, 76), "url" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 76, $this->source); })()), "url", [], "any", false, false, false, 76)]), "html", null, true);
  298. yield "\" />
  299. ";
  300. }
  301. // line 78
  302. yield " ";
  303. if (((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 78, $this->source); })()) < (isset($context["nbPages"]) || array_key_exists("nbPages", $context) ? $context["nbPages"] : (function () { throw new RuntimeError('Variable "nbPages" does not exist.', 78, $this->source); })()))) {
  304. // line 79
  305. yield " <link rel=\"next\" href=\"";
  306. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("category", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 79, $this->source); })()), "id", [], "any", false, false, false, 79), "url" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 79, $this->source); })()), "url", [], "any", false, false, false, 79), "page" => ((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 79, $this->source); })()) + 1)]), "html", null, true);
  307. yield "\" />
  308. ";
  309. }
  310. // line 81
  311. yield " ";
  312. }
  313. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  314. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  315. yield from [];
  316. }
  317. // line 84
  318. /**
  319. * @return iterable<null|scalar|\Stringable>
  320. */
  321. public function block_featured(array $context, array $blocks = []): iterable
  322. {
  323. $macros = $this->macros;
  324. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  325. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "featured"));
  326. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  327. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "featured"));
  328. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  329. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  330. yield from [];
  331. }
  332. // line 86
  333. /**
  334. * @return iterable<null|scalar|\Stringable>
  335. */
  336. public function block_breadcrumbs(array $context, array $blocks = []): iterable
  337. {
  338. $macros = $this->macros;
  339. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  340. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumbs"));
  341. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  342. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumbs"));
  343. // line 87
  344. yield " ";
  345. yield from $this->load("front/layout/breadcrumbs.html.twig", 87)->unwrap()->yield(CoreExtension::merge($context, ["category" => (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 87, $this->source); })())]));
  346. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  347. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  348. yield from [];
  349. }
  350. // line 90
  351. /**
  352. * @return iterable<null|scalar|\Stringable>
  353. */
  354. public function block_content(array $context, array $blocks = []): iterable
  355. {
  356. $macros = $this->macros;
  357. $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  358. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  359. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  360. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
  361. // line 91
  362. yield " <div class=\"ctn category-view ";
  363. yield (((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 91, $this->source); })()), "isRoot", [], "method", false, false, false, 91)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("category-view-universe") : (""));
  364. yield "\">
  365. ";
  366. // line 92
  367. if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  368. // line 93
  369. yield " <div class=\"admin-tools\">
  370. <a href=\"";
  371. // line 94
  372. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("admin_category_edit", ["id" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 94, $this->source); })()), "id", [], "any", false, false, false, 94)]), "html", null, true);
  373. yield "\" class=\"admin-update\" target=\"_blank\">modifier la catégorie</a>
  374. </div>
  375. ";
  376. }
  377. // line 97
  378. yield " <h1>";
  379. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["categoryDescription"]) || array_key_exists("categoryDescription", $context) ? $context["categoryDescription"] : (function () { throw new RuntimeError('Variable "categoryDescription" does not exist.', 97, $this->source); })()), "headingTitle", [], "any", false, false, false, 97), "html", null, true);
  380. yield " ";
  381. if (((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 97, $this->source); })()) > 1)) {
  382. yield "(page ";
  383. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 97, $this->source); })()), "html", null, true);
  384. yield ")";
  385. }
  386. yield "</h1>
  387. ";
  388. // line 98
  389. if ((($tmp = !CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 98, $this->source); })()), "isRoot", [], "method", false, false, false, 98)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  390. // line 99
  391. yield " <aside>
  392. <nav>
  393. ";
  394. // line 101
  395. yield from $this->load("front/catalog/category/tree.html.twig", 101)->unwrap()->yield(CoreExtension::merge($context, ["category" => CoreExtension::getAttribute($this->env, $this->source, (isset($context["path"]) || array_key_exists("path", $context) ? $context["path"] : (function () { throw new RuntimeError('Variable "path" does not exist.', 101, $this->source); })()), 0, [], "any", false, false, false, 101), "path" => (isset($context["path"]) || array_key_exists("path", $context) ? $context["path"] : (function () { throw new RuntimeError('Variable "path" does not exist.', 101, $this->source); })()), "current" => (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 101, $this->source); })())]));
  396. // line 102
  397. yield " </nav>
  398. </aside>
  399. ";
  400. }
  401. // line 105
  402. yield " <div";
  403. if ((($tmp = !CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 105, $this->source); })()), "isRoot", [], "method", false, false, false, 105)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  404. yield " class=\"center\"";
  405. }
  406. yield ">
  407. <div class=\"product-ctn\">
  408. ";
  409. // line 107
  410. yield from $this->load("front/catalog/product/list.html.twig", 107)->unwrap()->yield(CoreExtension::merge($context, ["products" => (isset($context["products"]) || array_key_exists("products", $context) ? $context["products"] : (function () { throw new RuntimeError('Variable "products" does not exist.', 107, $this->source); })()), "productTitleTag" => "h2", "listClass" => (((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 107, $this->source); })()), "isRoot", [], "method", false, false, false, 107)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ("wide-list") : (""))]));
  411. // line 108
  412. yield " </div>
  413. </div>
  414. </div>
  415. ";
  416. // line 111
  417. yield $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment(Symfony\Bridge\Twig\Extension\HttpKernelExtension::controller("App\\Controller\\Front\\Modules\\SeenProductsController::block", ["request" => CoreExtension::getAttribute($this->env, $this->source, // line 113
  418. (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 113, $this->source); })()), "request", [], "any", false, false, false, 113)]));
  419. // line 114
  420. yield "
  421. <div class=\"ctn\">
  422. ";
  423. // line 116
  424. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 116, $this->source); })()), "tags", [], "any", false, false, false, 116)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  425. // line 117
  426. yield " <div class=\"rte tags\">
  427. <div class=\"title-ctn\">
  428. <div class=\"title\">";
  429. // line 119
  430. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Craquez aussi pour...", [], "messages");
  431. yield "</div>
  432. </div>
  433. ";
  434. // line 121
  435. yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["categoryDescription"]) || array_key_exists("categoryDescription", $context) ? $context["categoryDescription"] : (function () { throw new RuntimeError('Variable "categoryDescription" does not exist.', 121, $this->source); })()), "tags", [], "any", false, false, false, 121);
  436. yield "
  437. </div>
  438. ";
  439. }
  440. // line 124
  441. yield " ";
  442. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 124, $this->source); })()), "description", [], "any", false, false, false, 124)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  443. // line 125
  444. yield " <div class=\"rte seo\">
  445. <div class=\"title-ctn\">
  446. <div class=\"title\">";
  447. // line 127
  448. yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Tout savoir sur", [], "messages");
  449. yield " \"";
  450. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["category"]) || array_key_exists("category", $context) ? $context["category"] : (function () { throw new RuntimeError('Variable "category" does not exist.', 127, $this->source); })()), "name", [], "any", false, false, false, 127), "html", null, true);
  451. yield "\"</div>
  452. </div>
  453. <div class=\"description\">";
  454. // line 129
  455. yield CoreExtension::getAttribute($this->env, $this->source, (isset($context["categoryDescription"]) || array_key_exists("categoryDescription", $context) ? $context["categoryDescription"] : (function () { throw new RuntimeError('Variable "categoryDescription" does not exist.', 129, $this->source); })()), "description", [], "any", false, false, false, 129);
  456. yield "</div>
  457. </div>
  458. ";
  459. }
  460. // line 132
  461. yield " <div class=\"footer-spacer\"></div>
  462. </div>
  463. ";
  464. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  465. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  466. yield from [];
  467. }
  468. /**
  469. * @codeCoverageIgnore
  470. */
  471. public function getTemplateName(): string
  472. {
  473. return "front/catalog/category/view.html.twig";
  474. }
  475. /**
  476. * @codeCoverageIgnore
  477. */
  478. public function isTraitable(): bool
  479. {
  480. return false;
  481. }
  482. /**
  483. * @codeCoverageIgnore
  484. */
  485. public function getDebugInfo(): array
  486. {
  487. return array ( 519 => 132, 513 => 129, 506 => 127, 502 => 125, 499 => 124, 493 => 121, 488 => 119, 484 => 117, 482 => 116, 478 => 114, 476 => 113, 475 => 111, 470 => 108, 468 => 107, 460 => 105, 455 => 102, 453 => 101, 449 => 99, 447 => 98, 436 => 97, 430 => 94, 427 => 93, 425 => 92, 420 => 91, 407 => 90, 395 => 87, 382 => 86, 360 => 84, 348 => 81, 342 => 79, 339 => 78, 333 => 76, 331 => 75, 326 => 74, 323 => 73, 320 => 72, 314 => 70, 311 => 69, 305 => 67, 299 => 65, 296 => 64, 294 => 63, 290 => 62, 279 => 61, 266 => 60, 243 => 58, 225 => 50, 221 => 49, 215 => 46, 211 => 44, 208 => 43, 189 => 39, 183 => 37, 177 => 35, 175 => 34, 169 => 31, 165 => 29, 162 => 28, 145 => 27, 139 => 24, 135 => 23, 129 => 20, 119 => 12, 116 => 11, 103 => 10, 90 => 7, 85 => 5, 82 => 4, 69 => 3, 46 => 1,);
  488. }
  489. public function getSourceContext(): Source
  490. {
  491. return new Source("{% extends 'front/front.html.twig' %}
  492. {% block javascripts %}
  493. <script>
  494. config.categoryId = {{ category.id }};
  495. </script>
  496. <script src=\"{{ asset('js/filters.js') }}\"></script>
  497. {% endblock %}
  498. {% block structuredData %}
  499. {% set cpt = 1 %}
  500. <script type=\"application/ld+json\">
  501. {
  502. \"@context\": \"https://schema.org\",
  503. \"@type\": \"BreadcrumbList\",
  504. \"itemListElement\":
  505. [
  506. {
  507. \"@type\": \"ListItem\",
  508. \"position\": {{ cpt }},
  509. \"item\":
  510. {
  511. \"@id\": \"{{ url('index') }}\",
  512. \"name\": \"{% trans %}Vivog | Matériel pour les toiletteurs et éleveurs{% endtrans %}\"
  513. }
  514. },
  515. {% for p in path %}
  516. {% set cpt = cpt + 1 %}
  517. {
  518. \"@type\": \"ListItem\",
  519. \"position\": {{ cpt }},
  520. \"item\":
  521. {
  522. {% if loop.index == 1 %}
  523. \"@id\": \"{{ url('universe',{url:p.url,id:p.id}) }}\",
  524. {% else %}
  525. \"@id\": \"{{ url('category',{url:p.url,id:p.id}) }}\",
  526. {% endif %}
  527. \"name\": \"{{ p.name }}\"
  528. }
  529. },
  530. {% endfor %}
  531. {% set cpt = cpt + 1 %}
  532. {
  533. \"@type\": \"ListItem\",
  534. \"position\": {{ cpt }},
  535. \"item\":
  536. {
  537. \"@id\": \"{{ url('category',{url:category.url,id:category.id}) }}\",
  538. \"name\": \"{{ category.name }}\"
  539. }
  540. }
  541. ]
  542. }
  543. </script>
  544. {% endblock %}
  545. {% block bodyClass %}category{% endblock %}
  546. {% block metas %}
  547. <title>{{ categoryDescription.headTitleTag ? categoryDescription.headTitleTag : categoryDescription.name }} {% if page > 1 %}(page {{ page }}){% endif %}</title>
  548. <meta name=\"description\" content=\"{{ categoryDescription.headDescTag ? categoryDescription.headDescTag : categoryDescription.description|metadescription }}\">
  549. {% if category.parent %}
  550. {% if page > 1 %}
  551. <link rel=\"canonical\" href=\"{{ url('category',{id:category.id, url:category.url, page:page}) }}\" />
  552. {% else %}
  553. <link rel=\"canonical\" href=\"{{ url('category',{id:category.id, url:category.url}) }}\" />
  554. {% endif %}
  555. {% else %}
  556. <link rel=\"canonical\" href=\"{{ url('universe',{id:category.id, url:category.url}) }}\" />
  557. {% endif %}
  558. {% if nbPages > 1 %}
  559. {% if page > 2 %}
  560. <link rel=\"prev\" href=\"{{ url('category',{id:category.id, url:category.url, page:page-1}) }}\" />
  561. {% elseif page == 2 %}
  562. <link rel=\"prev\" href=\"{{ url('category',{id:category.id, url:category.url}) }}\" />
  563. {% endif %}
  564. {% if page < nbPages %}
  565. <link rel=\"next\" href=\"{{ url('category',{id:category.id, url:category.url, page:page+1}) }}\" />
  566. {% endif %}
  567. {% endif %}
  568. {% endblock %}
  569. {% block featured %}{% endblock %}
  570. {% block breadcrumbs %}
  571. {% include 'front/layout/breadcrumbs.html.twig' with {category:category} %}
  572. {% endblock %}
  573. {% block content %}
  574. <div class=\"ctn category-view {{ category.isRoot() ? 'category-view-universe' : ''}}\">
  575. {% if is_granted('ROLE_ADMIN') %}
  576. <div class=\"admin-tools\">
  577. <a href=\"{{ path('admin_category_edit',{id:category.id}) }}\" class=\"admin-update\" target=\"_blank\">modifier la catégorie</a>
  578. </div>
  579. {% endif %}
  580. <h1>{{ categoryDescription.headingTitle }} {% if page > 1 %}(page {{ page }}){% endif %}</h1>
  581. {% if not category.isRoot() %}
  582. <aside>
  583. <nav>
  584. {% include 'front/catalog/category/tree.html.twig' with {category:attribute(path, 0), path:path, current:category} %}
  585. </nav>
  586. </aside>
  587. {% endif %}
  588. <div{% if not category.isRoot() %} class=\"center\"{% endif %}>
  589. <div class=\"product-ctn\">
  590. {% include 'front/catalog/product/list.html.twig' with { products:products, productTitleTag:'h2', listClass:(category.isRoot() ? 'wide-list' : '') }%}
  591. </div>
  592. </div>
  593. </div>
  594. {{ render(controller(
  595. 'App\\\\Controller\\\\Front\\\\Modules\\\\SeenProductsController::block',
  596. { 'request': app.request }
  597. )) }}
  598. <div class=\"ctn\">
  599. {% if category.tags %}
  600. <div class=\"rte tags\">
  601. <div class=\"title-ctn\">
  602. <div class=\"title\">{% trans %}Craquez aussi pour...{% endtrans %}</div>
  603. </div>
  604. {{ categoryDescription.tags|raw }}
  605. </div>
  606. {% endif %}
  607. {% if category.description %}
  608. <div class=\"rte seo\">
  609. <div class=\"title-ctn\">
  610. <div class=\"title\">{% trans %}Tout savoir sur{% endtrans %} \"{{ category.name }}\"</div>
  611. </div>
  612. <div class=\"description\">{{ categoryDescription.description|raw }}</div>
  613. </div>
  614. {% endif %}
  615. <div class=\"footer-spacer\"></div>
  616. </div>
  617. {% endblock %}", "front/catalog/category/view.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/category/view.html.twig");
  618. }
  619. }