<?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;
/* front/catalog/product/list.html.twig */
class __TwigTemplate_46ae415d9a435f7d1b96e7185984bdef extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$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/product/list.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/product/list.html.twig"));
// line 1
if ( !array_key_exists("titleTag", $context)) {
// line 2
yield " ";
$context["titleTag"] = "div";
}
// line 4
if ( !array_key_exists("showFilter", $context)) {
// line 5
yield " ";
$context["showFilter"] = true;
}
// line 7
$context["filterForm"] = (array_key_exists("productCount", $context) || (array_key_exists("filters", $context) && (isset($context["filters"]) || array_key_exists("filters", $context) ? $context["filters"] : (function () { throw new RuntimeError('Variable "filters" does not exist.', 7, $this->source); })())));
// line 8
yield "<div class=\"product-list-ctn ";
if (array_key_exists("listClass", $context)) {
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["listClass"]) || array_key_exists("listClass", $context) ? $context["listClass"] : (function () { throw new RuntimeError('Variable "listClass" does not exist.', 8, $this->source); })()), "html", null, true);
}
yield "\">
\t";
// line 9
if ((isset($context["showFilter"]) || array_key_exists("showFilter", $context) ? $context["showFilter"] : (function () { throw new RuntimeError('Variable "showFilter" does not exist.', 9, $this->source); })())) {
// line 10
yield "\t\t<div class=\"product-list-header\">
\t\t\t";
// line 11
if ((isset($context["filterForm"]) || array_key_exists("filterForm", $context) ? $context["filterForm"] : (function () { throw new RuntimeError('Variable "filterForm" does not exist.', 11, $this->source); })())) {
// line 12
yield "\t\t\t\t<form class=\"product-selection collapse\" ";
if (array_key_exists("filterUrl", $context)) {
yield "action=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["filterUrl"]) || array_key_exists("filterUrl", $context) ? $context["filterUrl"] : (function () { throw new RuntimeError('Variable "filterUrl" does not exist.', 12, $this->source); })()), "html", null, true);
yield "\"";
}
yield ">
\t\t\t";
}
// line 14
yield "\t\t\t";
if (array_key_exists("productCount", $context)) {
// line 15
yield "\t\t\t<div class=\"sort\">
\t";
// line 17
yield " ";
if ( !array_key_exists("sort", $context)) {
// line 18
yield " ";
$context["sort"] = "";
// line 19
yield " ";
}
// line 20
yield " <select name=\"sort\" id=\"list-sort\" class=\"select2\" data-placeholder=\"";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Trier par", [], "messages");
yield "\">
<option value=\"\" ";
// line 21
if (((isset($context["sort"]) || array_key_exists("sort", $context) ? $context["sort"] : (function () { throw new RuntimeError('Variable "sort" does not exist.', 21, $this->source); })()) == "")) {
yield "selected";
}
yield ">";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Trier par", [], "messages");
yield " :</option>
<option value=\"name-asc\" ";
// line 22
if (((isset($context["sort"]) || array_key_exists("sort", $context) ? $context["sort"] : (function () { throw new RuntimeError('Variable "sort" does not exist.', 22, $this->source); })()) == "name-asc")) {
yield "selected";
}
yield ">";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Nom", [], "messages");
yield "</option>
<option value=\"price-asc\" ";
// line 23
if (((isset($context["sort"]) || array_key_exists("sort", $context) ? $context["sort"] : (function () { throw new RuntimeError('Variable "sort" does not exist.', 23, $this->source); })()) == "price-asc")) {
yield "selected";
}
yield ">";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Prix croissant", [], "messages");
yield "</option>
<option value=\"price-desc\" ";
// line 24
if (((isset($context["sort"]) || array_key_exists("sort", $context) ? $context["sort"] : (function () { throw new RuntimeError('Variable "sort" does not exist.', 24, $this->source); })()) == "price-desc")) {
yield "selected";
}
yield ">";
yield $this->env->getExtension('Symfony\Bridge\Twig\Extension\TranslationExtension')->trans("Prix décroissant", [], "messages");
yield "</option>
</select>
\t\t\t</div>
\t\t\t";
}
// line 28
yield "\t\t\t";
if ((array_key_exists("filters", $context) && (isset($context["filters"]) || array_key_exists("filters", $context) ? $context["filters"] : (function () { throw new RuntimeError('Variable "filters" does not exist.', 28, $this->source); })()))) {
// line 29
yield "\t\t\t\t";
yield from $this->loadTemplate("front/catalog/category/filter.html.twig", "front/catalog/product/list.html.twig", 29)->unwrap()->yield($context);
// line 30
yield "\t\t\t";
}
// line 31
yield "\t\t\t";
if ((isset($context["filterForm"]) || array_key_exists("filterForm", $context) ? $context["filterForm"] : (function () { throw new RuntimeError('Variable "filterForm" does not exist.', 31, $this->source); })())) {
// line 32
yield "\t\t\t\t</form>
\t\t\t";
}
// line 34
yield "\t\t</div>
\t";
}
// line 36
yield "\t";
if ((array_key_exists("title", $context) && (isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 36, $this->source); })()))) {
// line 37
yield "\t<div class=\"title-ctn\">
\t\t<";
// line 38
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["titleTag"]) || array_key_exists("titleTag", $context) ? $context["titleTag"] : (function () { throw new RuntimeError('Variable "titleTag" does not exist.', 38, $this->source); })()), "html", null, true);
yield " class=\"title\">";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["title"]) || array_key_exists("title", $context) ? $context["title"] : (function () { throw new RuntimeError('Variable "title" does not exist.', 38, $this->source); })()), "html", null, true);
yield "</";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["titleTag"]) || array_key_exists("titleTag", $context) ? $context["titleTag"] : (function () { throw new RuntimeError('Variable "titleTag" does not exist.', 38, $this->source); })()), "html", null, true);
yield ">
\t\t<hr>
\t</div>
\t";
}
// line 42
yield "\t";
yield from $this->loadTemplate("front/catalog/product/view/list.html.twig", "front/catalog/product/list.html.twig", 42)->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.', 42, $this->source); })())]));
// line 43
yield "\t";
if (array_key_exists("nbPages", $context)) {
// line 44
yield "\t<div class=\"pagination-ctn\">
";
// line 45
yield from $this->loadTemplate("front/catalog/product/pagination.html.twig", "front/catalog/product/list.html.twig", 45)->unwrap()->yield(CoreExtension::merge($context, ["nbPages" => (isset($context["nbPages"]) || array_key_exists("nbPages", $context) ? $context["nbPages"] : (function () { throw new RuntimeError('Variable "nbPages" does not exist.', 45, $this->source); })()), "page" => (isset($context["page"]) || array_key_exists("page", $context) ? $context["page"] : (function () { throw new RuntimeError('Variable "page" does not exist.', 45, $this->source); })())]));
// line 46
yield "\t</div>
\t";
}
// line 48
yield "</div>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
return; yield '';
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "front/catalog/product/list.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable()
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo()
{
return array ( 189 => 48, 185 => 46, 183 => 45, 180 => 44, 177 => 43, 174 => 42, 163 => 38, 160 => 37, 157 => 36, 153 => 34, 149 => 32, 146 => 31, 143 => 30, 140 => 29, 137 => 28, 126 => 24, 118 => 23, 110 => 22, 102 => 21, 97 => 20, 94 => 19, 91 => 18, 88 => 17, 85 => 15, 82 => 14, 72 => 12, 70 => 11, 67 => 10, 65 => 9, 58 => 8, 56 => 7, 52 => 5, 50 => 4, 46 => 2, 44 => 1,);
}
public function getSourceContext()
{
return new Source("{% if titleTag is not defined %}
{% set titleTag = 'div' %}
{% endif %}
{% if showFilter is not defined %}
{% set showFilter = true %}
{% endif %}
{% set filterForm = (productCount is defined) or (filters is defined and filters) %}
<div class=\"product-list-ctn {%if listClass is defined%}{{ listClass }}{% endif %}\">
\t{% if showFilter %}
\t\t<div class=\"product-list-header\">
\t\t\t{% if filterForm %}
\t\t\t\t<form class=\"product-selection collapse\" {% if filterUrl is defined %}action=\"{{ filterUrl }}\"{% endif %}>
\t\t\t{% endif %}
\t\t\t{% if productCount is defined %}
\t\t\t<div class=\"sort\">
\t{# <label for=\"list-sort\">{% trans %}trier par :{% endtrans %}</label>#}
{% if sort is not defined %}
{% set sort = '' %}
{% endif %}
<select name=\"sort\" id=\"list-sort\" class=\"select2\" data-placeholder=\"{% trans %}Trier par {% endtrans %}\">
<option value=\"\" {% if sort == '' %}selected{% endif %}>{% trans %}Trier par {% endtrans %} :</option>
<option value=\"name-asc\" {% if sort == 'name-asc' %}selected{% endif %}>{% trans %}Nom{% endtrans %}</option>
<option value=\"price-asc\" {% if sort == 'price-asc' %}selected{% endif %}>{% trans %}Prix croissant{% endtrans %}</option>
<option value=\"price-desc\" {% if sort == 'price-desc' %}selected{% endif %}>{% trans %}Prix décroissant{% endtrans %}</option>
</select>
\t\t\t</div>
\t\t\t{% endif %}
\t\t\t{% if filters is defined and filters %}
\t\t\t\t{% include 'front/catalog/category/filter.html.twig' %}
\t\t\t{% endif %}
\t\t\t{% if filterForm %}
\t\t\t\t</form>
\t\t\t{% endif %}
\t\t</div>
\t{% endif %}
\t{% if title is defined and title %}
\t<div class=\"title-ctn\">
\t\t<{{ titleTag }} class=\"title\">{{ title }}</{{ titleTag }}>
\t\t<hr>
\t</div>
\t{% endif %}
\t{% include 'front/catalog/product/view/list.html.twig' with {products:products} %}
\t{% if nbPages is defined %}
\t<div class=\"pagination-ctn\">
{% include 'front/catalog/product/pagination.html.twig' with {nbPages:nbPages, page:page} %}
\t</div>
\t{% endif %}
</div>", "front/catalog/product/list.html.twig", "/var/www/dogcat.com/v2-test/templates/front/catalog/product/list.html.twig");
}
}