<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
use Twig\Extension\SandboxExtension;
use Twig\Markup;
use Twig\Sandbox\SecurityError;
use Twig\Sandbox\SecurityNotAllowedTagError;
use Twig\Sandbox\SecurityNotAllowedFilterError;
use Twig\Sandbox\SecurityNotAllowedFunctionError;
use Twig\Source;
use Twig\Template;
use Twig\TemplateWrapper;
/* front/catalog/category/view.html.twig */
class __TwigTemplate_eb94498699fedc27e8f28e0f46184a21 extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'javascripts' => [$this, 'block_javascripts'],
'structuredData' => [$this, 'block_structuredData'],
'bodyClass' => [$this, 'block_bodyClass'],
'metas' => [$this, 'block_metas'],
'featured' => [$this, 'block_featured'],
'breadcrumbs' => [$this, 'block_breadcrumbs'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "front/front.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/category/view.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "front/catalog/category/view.html.twig"));
$this->parent = $this->load("front/front.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_javascripts(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "javascripts"));
// line 4
yield " <script>
config.categoryId = ";
// line 5
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);
yield ";
</script>
<script src=\"";
// line 7
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("js/filters.js"), "html", null, true);
yield "\"></script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 10
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_structuredData(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "structuredData"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "structuredData"));
// line 11
yield " ";
$context["cpt"] = 1;
// line 12
yield " <script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org\",
\"@type\": \"BreadcrumbList\",
\"itemListElement\":
[
{
\"@type\": \"ListItem\",
\"position\": ";
// line 20
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);
yield ",
\"item\":
{
\"@id\": \"";
// line 23
yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("index");
yield "\",
\"name\": \"";
// line 24
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Vivog | Matériel pour les toiletteurs et éleveurs", [], "messages");
yield "\"
}
},
";
// line 27
$context['_parent'] = $context;
$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); })()));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
// line 28
yield " ";
$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);
// line 29
yield " {
\"@type\": \"ListItem\",
\"position\": ";
// line 31
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);
yield ",
\"item\":
{
";
// line 34
if ((CoreExtension::getAttribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 34) == 1)) {
// line 35
yield " \"@id\": \"";
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);
yield "\",
";
} else {
// line 37
yield " \"@id\": \"";
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);
yield "\",
";
}
// line 39
yield " \"name\": \"";
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);
yield "\"
}
},
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 43
yield " ";
$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);
// line 44
yield " {
\"@type\": \"ListItem\",
\"position\": ";
// line 46
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);
yield ",
\"item\":
{
\"@id\": \"";
// line 49
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);
yield "\",
\"name\": \"";
// line 50
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);
yield "\"
}
}
]
}
</script>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 58
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_bodyClass(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "bodyClass"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "bodyClass"));
yield "category";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 60
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_metas(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metas"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "metas"));
// line 61
yield " <title>";
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)));
yield " ";
if (((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 61, $this->source); })()) > 1)) {
yield "(page ";
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);
yield ")";
}
yield "</title>
<meta name=\"description\" content=\"";
// line 62
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)));
yield "\">
";
// line 63
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)) {
// line 64
yield " ";
if (((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 64, $this->source); })()) > 1)) {
// line 65
yield " <link rel=\"canonical\" href=\"";
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);
yield "\" />
";
} else {
// line 67
yield " <link rel=\"canonical\" href=\"";
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);
yield "\" />
";
}
// line 69
yield " ";
} else {
// line 70
yield " <link rel=\"canonical\" href=\"";
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);
yield "\" />
";
}
// line 72
yield " ";
if (((isset($context["nbPages"]) || array_key_exists("nbPages", $context) ? $context["nbPages"] : (function () { throw new RuntimeError('Variable "nbPages" does not exist.', 72, $this->source); })()) > 1)) {
// line 73
yield " ";
if (((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 73, $this->source); })()) > 2)) {
// line 74
yield " <link rel=\"prev\" href=\"";
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);
yield "\" />
";
} elseif (( // line 75
(isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 75, $this->source); })()) == 2)) {
// line 76
yield " <link rel=\"prev\" href=\"";
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);
yield "\" />
";
}
// line 78
yield " ";
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); })()))) {
// line 79
yield " <link rel=\"next\" href=\"";
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);
yield "\" />
";
}
// line 81
yield " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 84
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_featured(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "featured"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "featured"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 86
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_breadcrumbs(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumbs"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "breadcrumbs"));
// line 87
yield " ";
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); })())]));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
// line 90
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_content(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "content"));
// line 91
yield " <div class=\"ctn category-view ";
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") : (""));
yield "\">
";
// line 92
if ((($tmp = $this->extensions['Symfony\Bridge\Twig\Extension\SecurityExtension']->isGranted("ROLE_ADMIN")) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 93
yield " <div class=\"admin-tools\">
<a href=\"";
// line 94
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);
yield "\" class=\"admin-update\" target=\"_blank\">modifier la catégorie</a>
</div>
";
}
// line 97
yield " <h1>";
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);
yield " ";
if (((isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 97, $this->source); })()) > 1)) {
yield "(page ";
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);
yield ")";
}
yield "</h1>
";
// line 98
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)) {
// line 99
yield " <aside>
<nav>
";
// line 101
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); })())]));
// line 102
yield " </nav>
</aside>
";
}
// line 105
yield " <div";
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)) {
yield " class=\"center\"";
}
yield ">
<div class=\"product-ctn\">
";
// line 107
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") : (""))]));
// line 108
yield " </div>
</div>
</div>
";
// line 111
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
(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)]));
// line 114
yield "
<div class=\"ctn\">
";
// line 116
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)) {
// line 117
yield " <div class=\"rte tags\">
<div class=\"title-ctn\">
<div class=\"title\">";
// line 119
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Craquez aussi pour...", [], "messages");
yield "</div>
</div>
";
// line 121
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);
yield "
</div>
";
}
// line 124
yield " ";
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)) {
// line 125
yield " <div class=\"rte seo\">
<div class=\"title-ctn\">
<div class=\"title\">";
// line 127
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Tout savoir sur", [], "messages");
yield " \"";
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);
yield "\"</div>
</div>
<div class=\"description\">";
// line 129
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);
yield "</div>
</div>
";
}
// line 132
yield " <div class=\"footer-spacer\"></div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "front/catalog/category/view.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
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,);
}
public function getSourceContext(): Source
{
return new Source("{% extends 'front/front.html.twig' %}
{% block javascripts %}
<script>
config.categoryId = {{ category.id }};
</script>
<script src=\"{{ asset('js/filters.js') }}\"></script>
{% endblock %}
{% block structuredData %}
{% set cpt = 1 %}
<script type=\"application/ld+json\">
{
\"@context\": \"https://schema.org\",
\"@type\": \"BreadcrumbList\",
\"itemListElement\":
[
{
\"@type\": \"ListItem\",
\"position\": {{ cpt }},
\"item\":
{
\"@id\": \"{{ url('index') }}\",
\"name\": \"{% trans %}Vivog | Matériel pour les toiletteurs et éleveurs{% endtrans %}\"
}
},
{% for p in path %}
{% set cpt = cpt + 1 %}
{
\"@type\": \"ListItem\",
\"position\": {{ cpt }},
\"item\":
{
{% if loop.index == 1 %}
\"@id\": \"{{ url('universe',{url:p.url,id:p.id}) }}\",
{% else %}
\"@id\": \"{{ url('category',{url:p.url,id:p.id}) }}\",
{% endif %}
\"name\": \"{{ p.name }}\"
}
},
{% endfor %}
{% set cpt = cpt + 1 %}
{
\"@type\": \"ListItem\",
\"position\": {{ cpt }},
\"item\":
{
\"@id\": \"{{ url('category',{url:category.url,id:category.id}) }}\",
\"name\": \"{{ category.name }}\"
}
}
]
}
</script>
{% endblock %}
{% block bodyClass %}category{% endblock %}
{% block metas %}
<title>{{ categoryDescription.headTitleTag ? categoryDescription.headTitleTag : categoryDescription.name }} {% if page > 1 %}(page {{ page }}){% endif %}</title>
<meta name=\"description\" content=\"{{ categoryDescription.headDescTag ? categoryDescription.headDescTag : categoryDescription.description|metadescription }}\">
{% if category.parent %}
{% if page > 1 %}
<link rel=\"canonical\" href=\"{{ url('category',{id:category.id, url:category.url, page:page}) }}\" />
{% else %}
<link rel=\"canonical\" href=\"{{ url('category',{id:category.id, url:category.url}) }}\" />
{% endif %}
{% else %}
<link rel=\"canonical\" href=\"{{ url('universe',{id:category.id, url:category.url}) }}\" />
{% endif %}
{% if nbPages > 1 %}
{% if page > 2 %}
<link rel=\"prev\" href=\"{{ url('category',{id:category.id, url:category.url, page:page-1}) }}\" />
{% elseif page == 2 %}
<link rel=\"prev\" href=\"{{ url('category',{id:category.id, url:category.url}) }}\" />
{% endif %}
{% if page < nbPages %}
<link rel=\"next\" href=\"{{ url('category',{id:category.id, url:category.url, page:page+1}) }}\" />
{% endif %}
{% endif %}
{% endblock %}
{% block featured %}{% endblock %}
{% block breadcrumbs %}
{% include 'front/layout/breadcrumbs.html.twig' with {category:category} %}
{% endblock %}
{% block content %}
<div class=\"ctn category-view {{ category.isRoot() ? 'category-view-universe' : ''}}\">
{% if is_granted('ROLE_ADMIN') %}
<div class=\"admin-tools\">
<a href=\"{{ path('admin_category_edit',{id:category.id}) }}\" class=\"admin-update\" target=\"_blank\">modifier la catégorie</a>
</div>
{% endif %}
<h1>{{ categoryDescription.headingTitle }} {% if page > 1 %}(page {{ page }}){% endif %}</h1>
{% if not category.isRoot() %}
<aside>
<nav>
{% include 'front/catalog/category/tree.html.twig' with {category:attribute(path, 0), path:path, current:category} %}
</nav>
</aside>
{% endif %}
<div{% if not category.isRoot() %} class=\"center\"{% endif %}>
<div class=\"product-ctn\">
{% include 'front/catalog/product/list.html.twig' with { products:products, productTitleTag:'h2', listClass:(category.isRoot() ? 'wide-list' : '') }%}
</div>
</div>
</div>
{{ render(controller(
'App\\\\Controller\\\\Front\\\\Modules\\\\SeenProductsController::block',
{ 'request': app.request }
)) }}
<div class=\"ctn\">
{% if category.tags %}
<div class=\"rte tags\">
<div class=\"title-ctn\">
<div class=\"title\">{% trans %}Craquez aussi pour...{% endtrans %}</div>
</div>
{{ categoryDescription.tags|raw }}
</div>
{% endif %}
{% if category.description %}
<div class=\"rte seo\">
<div class=\"title-ctn\">
<div class=\"title\">{% trans %}Tout savoir sur{% endtrans %} \"{{ category.name }}\"</div>
</div>
<div class=\"description\">{{ categoryDescription.description|raw }}</div>
</div>
{% endif %}
<div class=\"footer-spacer\"></div>
</div>
{% endblock %}", "front/catalog/category/view.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/category/view.html.twig");
}
}