<?php
use Twig\Environment;
use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
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;
/* @EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig */
class __TwigTemplate_e8517837fd02d537f7f017f877b31dfe extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'layout_navigation_offcanvas_navigation_categories' => [$this, 'block_layout_navigation_offcanvas_navigation_categories'],
];
}
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", "@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig"));
// line 2
$context["activeId"] = (((sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["navigation"] ?? null), "active", [], "any", false, true, false, 2), "id", [], "any", true, true, false, 2) && !(null === sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["navigation"] ?? null), "active", [], "any", false, true, false, 2), "id", [], "any", false, false, false, 2)))) ? (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["navigation"] ?? null), "active", [], "any", false, true, false, 2), "id", [], "any", false, false, false, 2)) : (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["context"] ?? null), "salesChannel", [], "any", false, false, false, 2), "navigationCategoryId", [], "any", false, false, false, 2)));
// line 3
$context["isRoot"] = (($context["activeId"] ?? null) == sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["context"] ?? null), "salesChannel", [], "any", false, false, false, 3), "navigationCategoryId", [], "any", false, false, false, 3));
// line 4
$context["children"] = sw_get_attribute($this->env, $this->source, ($context["navigation"] ?? null), "getChildren", [0 => ($context["activeId"] ?? null)], "method", false, false, false, 4);
// line 5
$context["active"] = sw_get_attribute($this->env, $this->source, ($context["navigation"] ?? null), "active", [], "any", false, false, false, 5);
// line 6
echo "
";
// line 7
$this->displayBlock('layout_navigation_offcanvas_navigation_categories', $context, $blocks);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function block_layout_navigation_offcanvas_navigation_categories($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(), "block", "layout_navigation_offcanvas_navigation_categories"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_navigation_offcanvas_navigation_categories"));
// line 8
echo " <div class=\"navigation-offcanvas-container js-navigation-offcanvas\">
<div class=\"navigation-offcanvas-overlay-content js-navigation-offcanvas-overlay-content\">
";
// line 10
if ( !($context["isRoot"] ?? null)) {
// line 11
echo " <div class=\"navigation-offcanvas-top\" style=\"display:flex\">
";
// line 12
$this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/show-all-link.html.twig", "@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig", 12)->display($context);
// line 13
echo "
";
// line 14
$this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/active-item-link.html.twig", "@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig", 14)->display(twig_array_merge($context, ["item" => ($context["active"] ?? null)]));
// line 15
echo "
";
// line 16
$this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/back-link.html.twig", "@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig", 16)->display(twig_array_merge($context, ["item" => ($context["active"] ?? null)]));
// line 17
echo " </div>
";
} else {
// line 19
echo " ";
// line 20
echo " ";
}
// line 21
echo "
<ul class=\"list-unstyled navigation-offcanvas-list offcanvas-custom-menu-ul\">
";
// line 23
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, ($context["children"] ?? null), "tree", [], "any", false, false, false, 23));
$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["item"]) {
// line 24
echo " ";
$this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/item-link.html.twig", "@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig", 24)->display(twig_array_merge($context, ["item" => $context["item"], "activeId" => ($context["activeId"] ?? null)]));
// line 25
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['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 26
echo "
<div class=\"navigation-offcanvas-top\">
";
// line 29
if (( !($context["isRoot"] ?? null) && (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "navigation", [], "any", false, false, false, 29), "active", [], "any", false, false, false, 29), "type", [], "any", false, false, false, 29) != "folder"))) {
// line 30
echo " ";
$this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/show-active-link.html.twig", "@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig", 30)->display(twig_array_merge($context, ["item" => ($context["active"] ?? null)]));
echo "
";
}
// line 32
echo " </div>
<div class=\"navigation-offcanvas-top-big\">
";
// line 35
if (( !($context["isRoot"] ?? null) && (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "navigation", [], "any", false, false, false, 35), "active", [], "any", false, false, false, 35), "type", [], "any", false, false, false, 35) != "folder"))) {
// line 36
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "header", [], "any", false, false, false, 36), "navigation", [], "any", false, false, false, 36), "tree", [], "any", false, false, false, 36));
$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["item"]) {
// line 37
echo " ";
$this->loadTemplate("@EmovaWbTheme/storefront/layout/navigation/offcanvas/item-link.html.twig", "@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig", 37)->display(twig_array_merge($context, ["item" => $context["item"], "activeId" => sw_get_attribute($this->env, $this->source, ($context["active"] ?? null), "Id", [], "any", false, false, false, 37), "parentId" => sw_get_attribute($this->env, $this->source, ($context["active"] ?? null), "parentId", [], "any", false, false, false, 37)]));
// line 38
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['item'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 39
echo " ";
}
// line 40
echo " </div>
</ul>
</div>
</div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 200 => 40, 197 => 39, 183 => 38, 180 => 37, 162 => 36, 160 => 35, 155 => 32, 149 => 30, 147 => 29, 142 => 26, 128 => 25, 125 => 24, 108 => 23, 104 => 21, 101 => 20, 99 => 19, 95 => 17, 93 => 16, 90 => 15, 88 => 14, 85 => 13, 83 => 12, 80 => 11, 78 => 10, 74 => 8, 55 => 7, 52 => 6, 50 => 5, 48 => 4, 46 => 3, 44 => 2,);
}
public function getSourceContext()
{
return new Source("{# @var navigation \\Shopware\\Core\\Content\\Category\\Tree\\Tree #}
{% set activeId = navigation.active.id ?? context.salesChannel.navigationCategoryId %}
{% set isRoot = activeId == context.salesChannel.navigationCategoryId %}
{% set children = navigation.getChildren(activeId) %}
{% set active = navigation.active %}
{% block layout_navigation_offcanvas_navigation_categories %}
<div class=\"navigation-offcanvas-container js-navigation-offcanvas\">
<div class=\"navigation-offcanvas-overlay-content js-navigation-offcanvas-overlay-content\">
{% if not isRoot %}
<div class=\"navigation-offcanvas-top\" style=\"display:flex\">
{% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-all-link.html.twig' %}
{% sw_include '@Storefront/storefront/layout/navigation/offcanvas/active-item-link.html.twig' with { item: active } %}
{% sw_include '@Storefront/storefront/layout/navigation/offcanvas/back-link.html.twig' with { item: active } %}
</div>
{% else %}
{# {% sw_include '@Storefront/storefront/layout/navigation/offcanvas/general-headline.html.twig' %} #}
{% endif %}
<ul class=\"list-unstyled navigation-offcanvas-list offcanvas-custom-menu-ul\">
{% for item in children.tree %}
{% sw_include '@Storefront/storefront/layout/navigation/offcanvas/item-link.html.twig' with { item: item, activeId: activeId } %}
{% endfor %}
<div class=\"navigation-offcanvas-top\">
{% if not isRoot and page.navigation.active.type != \"folder\" %}
{% sw_include '@Storefront/storefront/layout/navigation/offcanvas/show-active-link.html.twig' with { item: active } %}
{% endif %}
</div>
<div class=\"navigation-offcanvas-top-big\">
{% if not isRoot and page.navigation.active.type != \"folder\" %}
{% for item in page.header.navigation.tree %}
{% sw_include '@Storefront/storefront/layout/navigation/offcanvas/item-link.html.twig' with { item: item, activeId: active.Id, parentId: active.parentId } %}
{% endfor %}
{% endif %}
</div>
</ul>
</div>
</div>
{% endblock %}", "@EmovaWbTheme/storefront/layout/navigation/offcanvas/categories.html.twig", "/var/www/shop.emova.de/html/custom/plugins/EmovaWbTheme/src/Resources/views/storefront/layout/navigation/offcanvas/categories.html.twig");
}
}