var/cache/dev/twig/8e/8ed72dbf035ea61282da7872ed65339a.php line 385

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