<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
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;
/* frontend/fullmenu.html.twig */
class __TwigTemplate_6d7b1c675162e99827741b0cf6de5fedd77a435e2b4084c846fa4cd51c80aeb5 extends \Twig\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_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "frontend/fullmenu.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "frontend/fullmenu.html.twig"));
// line 1
echo "<div class=\"row\" style=\"margin-top: 70px;background-color: white;z-index:100; position: fixed; width:100%;\">
<!-- Menu principale-->
<nav class=\"navbar header-menu-main full-width d-none d-xl-block d-lg-block\">
<ul class=\"nav nav-justified group\">
";
// line 5
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 5, $this->source); })()), "menu", [], "any", false, false, false, 5));
foreach ($context['_seq'] as $context["_key"] => $context["menu"]) {
// line 6
echo " <!-- Menu principale À BOIRE-->
<li class=\"nav-item dropdown underline-effect-wrapper\">
<a class=\"nav-link underline-effect underline-effect-black underline-effect-h2 allowClick\"
data-toggle=\"dropdown\" href=\"#\" role=\"button\"
aria-haspopup=\"true\"
aria-expanded=\"false\">";
// line 11
echo twig_escape_filter($this->env, twig_upper_filter($this->env, twig_get_attribute($this->env, $this->source, $context["menu"], "name", [], "any", false, false, false, 11)), "html", null, true);
echo "</a>
<!-- Menu principale dropdown-menu-->
<div class=\"dropdown-menu\">
<div class=\"sous-menu row\">
<div class=\"sous-menu-main\">
<ul class=\"sous-menu-main-items\" style=\"margin-bottom:75px\">
<li class=\"alllistsMenu\" >
<a class=\" allowClick allProductsMenuitems\" style=\"color:black !important;\" href=\"";
// line 18
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("viewCategory", ["name" => twig_get_attribute($this->env, $this->source, $context["menu"], "UrlName", [], "any", false, false, false, 18)]), "html", null, true);
echo "\">Tous les produits ";
echo twig_escape_filter($this->env, twig_capitalize_string_filter($this->env, twig_get_attribute($this->env, $this->source, $context["menu"], "name", [], "any", false, false, false, 18)), "html", null, true);
echo "</a>
</li>
";
// line 20
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["menu"], "categories", [], "any", false, false, false, 20));
$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["submenu"]) {
// line 21
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["submenu"], "placement", [], "any", false, false, false, 21) > 0)) {
// line 22
echo "
<li class=\"sous-menu-main-item\" ";
// line 23
if (twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 23)) {
echo "active default";
}
echo ">
<a class=\"sous-menu-main-item-title allowClick\" href=\"";
// line 24
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("viewCategory", ["name" => twig_get_attribute($this->env, $this->source, $context["menu"], "UrlName", [], "any", false, false, false, 24), "sub1" => twig_get_attribute($this->env, $this->source, $context["submenu"], "UrlName", [], "any", false, false, false, 24)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["submenu"], "name", [], "any", false, false, false, 24), "html", null, true);
echo "
<span class=\"fa fa-chevron-right \" aria-hidden=\"true\" style=\"float: right;\"></span></a>
<div class=\"sous-submenu\">
<div class=\"row\">
";
// line 29
echo " ";
$context["amountPerCol"] = twig_length_filter($this->env, twig_get_attribute($this->env, $this->source, $context["submenu"], "categories", [], "any", false, false, false, 29));
// line 30
echo "
";
// line 31
$context["amountPerCol"] = ((isset($context["amountPerCol"]) || array_key_exists("amountPerCol", $context) ? $context["amountPerCol"] : (function () { throw new RuntimeError('Variable "amountPerCol" does not exist.', 31, $this->source); })()) / 2);
// line 32
echo " ";
$context["amountPerCol"] = twig_round((isset($context["amountPerCol"]) || array_key_exists("amountPerCol", $context) ? $context["amountPerCol"] : (function () { throw new RuntimeError('Variable "amountPerCol" does not exist.', 32, $this->source); })()), 0, "ceil");
// line 33
echo " ";
// line 34
echo "
";
// line 36
echo " ";
$context["firstRow"] = true;
// line 37
echo "
";
// line 39
echo " ";
$context["col"] = 1;
// line 40
echo " <div class=\"col-3\" style=\"padding-left:5px\">
<ul >
";
// line 42
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["submenu"], "categories", [], "any", false, false, false, 42));
foreach ($context['_seq'] as $context["_key"] => $context["subsubmenu"]) {
// line 43
echo " ";
if (twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 43, $this->source); })()), "hasProducts", [0 => $context["subsubmenu"]], "method", false, false, false, 43)) {
// line 44
echo " ";
if ((((isset($context["col"]) || array_key_exists("col", $context) ? $context["col"] : (function () { throw new RuntimeError('Variable "col" does not exist.', 44, $this->source); })()) > (isset($context["amountPerCol"]) || array_key_exists("amountPerCol", $context) ? $context["amountPerCol"] : (function () { throw new RuntimeError('Variable "amountPerCol" does not exist.', 44, $this->source); })())) && (isset($context["firstRow"]) || array_key_exists("firstRow", $context) ? $context["firstRow"] : (function () { throw new RuntimeError('Variable "firstRow" does not exist.', 44, $this->source); })()))) {
// line 45
echo " ";
$context["firstRow"] = false;
// line 46
echo " </ul>
</div>
<div class=\"col-3\">
<ul>
";
}
// line 52
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["subsubmenu"], "placement", [], "any", false, false, false, 52) > 0)) {
// line 53
echo " <li class=\"caption underline-effect-wrapper-l2\">
<a class=\"underline-effect-l2 allowClick underline-effect-black underline-effect-h1\"
href=\"";
// line 55
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("viewCategory", ["name" => twig_get_attribute($this->env, $this->source, $context["menu"], "UrlName", [], "any", false, false, false, 55), "sub1" => twig_get_attribute($this->env, $this->source, $context["submenu"], "UrlName", [], "any", false, false, false, 55), "sub2" => twig_get_attribute($this->env, $this->source, $context["subsubmenu"], "UrlName", [], "any", false, false, false, 55)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["subsubmenu"], "name", [], "any", false, false, false, 55), "html", null, true);
echo "</a>
</li>
";
}
// line 58
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $context["subsubmenu"], "categories", [], "any", false, false, false, 58));
foreach ($context['_seq'] as $context["_key"] => $context["endmenu"]) {
// line 59
echo " ";
if (twig_get_attribute($this->env, $this->source, (isset($context["global"]) || array_key_exists("global", $context) ? $context["global"] : (function () { throw new RuntimeError('Variable "global" does not exist.', 59, $this->source); })()), "hasProducts", [0 => $context["endmenu"]], "method", false, false, false, 59)) {
// line 60
echo " ";
if ((twig_get_attribute($this->env, $this->source, $context["endmenu"], "placement", [], "any", false, false, false, 60) > 0)) {
// line 61
echo " <li class=\"underline-effect-wrapper-l2\">
<a class=\"underline-effect-l2 allowClick underline-effect-gray underline-effect-h1\"
href=\"";
// line 63
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("viewCategory", ["name" => twig_get_attribute($this->env, $this->source, $context["menu"], "UrlName", [], "any", false, false, false, 63), "sub1" => twig_get_attribute($this->env, $this->source, $context["submenu"], "UrlName", [], "any", false, false, false, 63), "sub2" => twig_get_attribute($this->env, $this->source, $context["subsubmenu"], "UrlName", [], "any", false, false, false, 63), "sub3" => twig_get_attribute($this->env, $this->source, $context["endmenu"], "UrlName", [], "any", false, false, false, 63)]), "html", null, true);
echo "\">";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["endmenu"], "name", [], "any", false, false, false, 63), "html", null, true);
echo "</a>
</li>
";
// line 65
$context["col"] = ((isset($context["col"]) || array_key_exists("col", $context) ? $context["col"] : (function () { throw new RuntimeError('Variable "col" does not exist.', 65, $this->source); })()) + 1);
// line 66
echo " ";
}
// line 67
echo " ";
}
// line 68
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['endmenu'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 69
echo " ";
$context["col"] = ((isset($context["col"]) || array_key_exists("col", $context) ? $context["col"] : (function () { throw new RuntimeError('Variable "col" does not exist.', 69, $this->source); })()) + 1);
// line 70
echo " ";
}
// line 71
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['subsubmenu'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 72
echo "
";
// line 74
echo " ";
if ((((isset($context["col"]) || array_key_exists("col", $context) ? $context["col"] : (function () { throw new RuntimeError('Variable "col" does not exist.', 74, $this->source); })()) <= (isset($context["amountPerCol"]) || array_key_exists("amountPerCol", $context) ? $context["amountPerCol"] : (function () { throw new RuntimeError('Variable "amountPerCol" does not exist.', 74, $this->source); })())) || (isset($context["firstRow"]) || array_key_exists("firstRow", $context) ? $context["firstRow"] : (function () { throw new RuntimeError('Variable "firstRow" does not exist.', 74, $this->source); })()))) {
// line 75
echo " </ul>
</div>
<div class=\"col-3\">
<ul>
";
}
// line 81
echo " </ul>
</div>
</div>
</div>
</li>
";
}
// line 89
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['submenu'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 90
echo " </ul>
</div>
</div>
</div>
<!-- Menu principale dropdown-menu-->
</li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['menu'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 98
echo " <li class=\"nav-item dropdown underline-effect-wrapper\">
<a class=\"nav-link underline-effect underline-effect-black underline-effect-h2 allowClick\" href=";
// line 99
echo $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("viewSponsoredCategory");
echo ">SOLDES</a>
<!-- Menu principale dropdown-menu-->
</li>
</ul>
</nav>
<!-- Menu principale-->
</div>
";
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
public function getTemplateName()
{
return "frontend/fullmenu.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 282 => 99, 279 => 98, 266 => 90, 252 => 89, 242 => 81, 234 => 75, 231 => 74, 228 => 72, 222 => 71, 219 => 70, 216 => 69, 210 => 68, 207 => 67, 204 => 66, 202 => 65, 195 => 63, 191 => 61, 188 => 60, 185 => 59, 180 => 58, 172 => 55, 168 => 53, 165 => 52, 157 => 46, 154 => 45, 151 => 44, 148 => 43, 144 => 42, 140 => 40, 137 => 39, 134 => 37, 131 => 36, 128 => 34, 126 => 33, 123 => 32, 121 => 31, 118 => 30, 115 => 29, 106 => 24, 100 => 23, 97 => 22, 94 => 21, 77 => 20, 70 => 18, 60 => 11, 53 => 6, 49 => 5, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<div class=\"row\" style=\"margin-top: 70px;background-color: white;z-index:100; position: fixed; width:100%;\">
<!-- Menu principale-->
<nav class=\"navbar header-menu-main full-width d-none d-xl-block d-lg-block\">
<ul class=\"nav nav-justified group\">
{% for menu in global.menu %}
<!-- Menu principale À BOIRE-->
<li class=\"nav-item dropdown underline-effect-wrapper\">
<a class=\"nav-link underline-effect underline-effect-black underline-effect-h2 allowClick\"
data-toggle=\"dropdown\" href=\"#\" role=\"button\"
aria-haspopup=\"true\"
aria-expanded=\"false\">{{menu.name |upper}}</a>
<!-- Menu principale dropdown-menu-->
<div class=\"dropdown-menu\">
<div class=\"sous-menu row\">
<div class=\"sous-menu-main\">
<ul class=\"sous-menu-main-items\" style=\"margin-bottom:75px\">
<li class=\"alllistsMenu\" >
<a class=\" allowClick allProductsMenuitems\" style=\"color:black !important;\" href=\"{{path(\"viewCategory\", {\"name\": menu.UrlName})}}\">Tous les produits {{menu.name |capitalize }}</a>
</li>
{% for submenu in menu.categories %}
{% if submenu.placement > 0 %}
<li class=\"sous-menu-main-item\" {% if loop.first %}active default{% endif %}>
<a class=\"sous-menu-main-item-title allowClick\" href=\"{{path(\"viewCategory\", {\"name\": menu.UrlName, 'sub1':submenu.UrlName})}}\">{{submenu.name}}
<span class=\"fa fa-chevron-right \" aria-hidden=\"true\" style=\"float: right;\"></span></a>
<div class=\"sous-submenu\">
<div class=\"row\">
{# This is bad, but we calculate the amount of children to every menu to devide by columns #}
{% set amountPerCol = submenu.categories | length %}
{% set amountPerCol = amountPerCol / 2 %}
{% set amountPerCol = amountPerCol | round(0, 'ceil') %}
{# End calculation amount per columns we can display #}
{# Turn false once on the second row #}
{% set firstRow = true %}
{# we use col to know where we are at in the loop, increase to all menu or submenu #}
{% set col = 1 %}
<div class=\"col-3\" style=\"padding-left:5px\">
<ul >
{% for subsubmenu in submenu.categories %}
{% if global.hasProducts(subsubmenu) %}
{% if col > amountPerCol and firstRow%}
{% set firstRow = false %}
</ul>
</div>
<div class=\"col-3\">
<ul>
{% endif %}
{% if (subsubmenu.placement > 0) %}
<li class=\"caption underline-effect-wrapper-l2\">
<a class=\"underline-effect-l2 allowClick underline-effect-black underline-effect-h1\"
href=\"{{path(\"viewCategory\", {\"name\": menu.UrlName, 'sub1':submenu.UrlName, 'sub2': subsubmenu.UrlName})}}\">{{subsubmenu.name}}</a>
</li>
{% endif %}
{% for endmenu in subsubmenu.categories %}
{% if global.hasProducts(endmenu) %}
{% if (endmenu.placement > 0) %}
<li class=\"underline-effect-wrapper-l2\">
<a class=\"underline-effect-l2 allowClick underline-effect-gray underline-effect-h1\"
href=\"{{path(\"viewCategory\", {\"name\": menu.UrlName, 'sub1':submenu.UrlName, 'sub2': subsubmenu.UrlName, 'sub3': endmenu.UrlName})}}\">{{endmenu.name}}</a>
</li>
{% set col = col + 1 %}
{% endif %}
{% endif %}
{% endfor %}
{% set col = col + 1 %}
{% endif %}
{% endfor %}
{# In case we arrived a same amount of items #}
{% if col <= amountPerCol or firstRow%}
</ul>
</div>
<div class=\"col-3\">
<ul>
{% endif %}
</ul>
</div>
</div>
</div>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
</div>
</div>
<!-- Menu principale dropdown-menu-->
</li>
{% endfor %}
<li class=\"nav-item dropdown underline-effect-wrapper\">
<a class=\"nav-link underline-effect underline-effect-black underline-effect-h2 allowClick\" href={{path('viewSponsoredCategory')}}>SOLDES</a>
<!-- Menu principale dropdown-menu-->
</li>
</ul>
</nav>
<!-- Menu principale-->
</div>
", "frontend/fullmenu.html.twig", "/var/www/html/Markego/templates/frontend/fullmenu.html.twig");
}
}