<?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;
/* @Storefront/storefront/layout/breadcrumb.html.twig */
class __TwigTemplate_3d82bf97d4fa0360ca3360095f32dd4a extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'layout_breadcrumb_inner' => [$this, 'block_layout_breadcrumb_inner'],
'layout_breadcrumb_list' => [$this, 'block_layout_breadcrumb_list'],
'layout_breadcrumb_list_item' => [$this, 'block_layout_breadcrumb_list_item'],
'layout_breadcrumb_placeholder' => [$this, 'block_layout_breadcrumb_placeholder'],
];
}
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", "@Storefront/storefront/layout/breadcrumb.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@Storefront/storefront/layout/breadcrumb.html.twig"));
// line 1
$this->displayBlock('layout_breadcrumb_inner', $context, $blocks);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function block_layout_breadcrumb_inner($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_breadcrumb_inner"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_breadcrumb_inner"));
// line 2
echo " ";
if (($context["category"] ?? null)) {
// line 3
echo " ";
$context["breadcrumbCategories"] = $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\BuildBreadcrumbExtension']->getFullBreadcrumb($context, ($context["category"] ?? null), sw_get_attribute($this->env, $this->source, ($context["context"] ?? null), "context", [], "any", false, false, false, 3));
// line 4
echo " ";
$context["categoryId"] = sw_get_attribute($this->env, $this->source, ($context["category"] ?? null), "id", [], "any", false, false, false, 4);
// line 5
echo "
";
// line 6
if ($this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\FeatureFlagExtension']->feature("v6.5.0.0")) {
// line 7
echo " ";
$context["breadcrumbKeys"] = twig_get_array_keys_filter(($context["breadcrumbCategories"] ?? null));
// line 8
echo " ";
} else {
// line 9
echo " ";
// line 10
echo " ";
$context["breadcrumb"] = $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\BuildBreadcrumbExtension']->buildSeoBreadcrumb($context, ($context["category"] ?? null));
// line 11
echo " ";
// line 12
echo " ";
$context["breadcrumbKeys"] = twig_get_array_keys_filter(($context["breadcrumb"] ?? null));
// line 13
echo " ";
// line 14
echo " ";
$context["breadcrumbTypes"] = $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\BuildBreadcrumbExtension']->buildCategoryTypes(($context["breadcrumbCategories"] ?? null));
// line 15
echo " ";
}
// line 16
echo "
";
// line 17
if ((twig_length_filter($this->env, ($context["breadcrumbCategories"] ?? null)) > 0)) {
// line 18
echo " <nav aria-label=\"breadcrumb\">
";
// line 19
$this->displayBlock('layout_breadcrumb_list', $context, $blocks);
// line 62
echo " </nav>
";
}
// line 64
echo " ";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 19
public function block_layout_breadcrumb_list($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_breadcrumb_list"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_breadcrumb_list"));
// line 20
echo " <ol class=\"breadcrumb\"
itemscope
itemtype=\"https://schema.org/BreadcrumbList\">
";
// line 23
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(($context["breadcrumbCategories"] ?? null));
$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["breadcrumbCategory"]) {
// line 24
echo " ";
$context["key"] = sw_get_attribute($this->env, $this->source, $context["breadcrumbCategory"], "id", [], "any", false, false, false, 24);
// line 25
echo " ";
$context["name"] = sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["breadcrumbCategory"], "translated", [], "any", false, false, false, 25), "name", [], "any", false, false, false, 25);
// line 26
echo "
";
// line 27
$this->displayBlock('layout_breadcrumb_list_item', $context, $blocks);
// line 51
echo "
";
// line 52
$this->displayBlock('layout_breadcrumb_placeholder', $context, $blocks);
// line 59
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['breadcrumbCategory'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 60
echo " </ol>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 27
public function block_layout_breadcrumb_list_item($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_breadcrumb_list_item"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_breadcrumb_list_item"));
// line 28
echo " <li class=\"breadcrumb-item\"
";
// line 29
if ((($context["key"] ?? null) === ($context["categoryId"] ?? null))) {
echo "aria-current=\"page\"";
}
// line 30
echo " itemprop=\"itemListElement\"
itemscope
itemtype=\"https://schema.org/ListItem\">
";
// line 33
if ((sw_get_attribute($this->env, $this->source, ($context["breadcrumbCategory"] ?? null), "type", [], "any", false, false, false, 33) == "folder")) {
// line 34
echo " <div itemprop=\"item\">
<div itemprop=\"name\">";
// line 35
echo sw_escape_filter($this->env, ($context["name"] ?? null), "html", null, true);
echo "</div>
</div>
";
} else {
// line 38
echo " <a href=\"";
echo $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\CategoryUrlExtension']->getCategoryUrl($context, ($context["breadcrumbCategory"] ?? null));
echo "\"
class=\"breadcrumb-link ";
// line 39
if ((($context["key"] ?? null) === ($context["categoryId"] ?? null))) {
echo " is-active";
}
echo "\"
title=\"";
// line 40
echo sw_escape_filter($this->env, ($context["name"] ?? null), "html", null, true);
echo "\"
";
// line 41
if ($this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\CategoryUrlExtension']->isLinkNewTab(($context["breadcrumbCategory"] ?? null))) {
echo "target=\"_blank\"";
}
// line 42
echo " itemprop=\"item\">
<link itemprop=\"url\"
href=\"";
// line 44
echo $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\CategoryUrlExtension']->getCategoryUrl($context, ($context["breadcrumbCategory"] ?? null));
echo "\"/>
<span class=\"breadcrumb-title\" itemprop=\"name\">";
// line 45
echo sw_escape_filter($this->env, ($context["name"] ?? null), "html", null, true);
echo "</span>
</a>
";
}
// line 48
echo " <meta itemprop=\"position\" content=\"";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["loop"] ?? null), "index", [], "any", false, false, false, 48), "html", null, true);
echo "\"/>
</li>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 52
public function block_layout_breadcrumb_placeholder($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_breadcrumb_placeholder"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "layout_breadcrumb_placeholder"));
// line 53
echo " ";
if ((($context["key"] ?? null) != twig_last($this->env, ($context["breadcrumbKeys"] ?? null)))) {
// line 54
echo " <div class=\"breadcrumb-placeholder\">
";
// line 55
((function () use ($context, $blocks) {
$finder = $this->env->getExtension('Shopware\Core\Framework\Adapter\Twig\Extension\NodeExtension')->getFinder();
$includeTemplate = $finder->find("@Storefront/storefront/utilities/icon.html.twig");
return $this->loadTemplate($includeTemplate ?? null, "@Storefront/storefront/layout/breadcrumb.html.twig", 55);
})())->display(twig_array_merge($context, ["size" => "fluid", "pack" => "solid", "name" => "arrow-medium-right"]));
// line 56
echo " </div>
";
}
// line 58
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@Storefront/storefront/layout/breadcrumb.html.twig";
}
public function getDebugInfo()
{
return array ( 310 => 58, 306 => 56, 298 => 55, 295 => 54, 292 => 53, 282 => 52, 268 => 48, 262 => 45, 258 => 44, 254 => 42, 250 => 41, 246 => 40, 240 => 39, 235 => 38, 229 => 35, 226 => 34, 224 => 33, 219 => 30, 215 => 29, 212 => 28, 202 => 27, 191 => 60, 177 => 59, 175 => 52, 172 => 51, 170 => 27, 167 => 26, 164 => 25, 161 => 24, 144 => 23, 139 => 20, 129 => 19, 118 => 64, 114 => 62, 112 => 19, 109 => 18, 107 => 17, 104 => 16, 101 => 15, 98 => 14, 96 => 13, 93 => 12, 91 => 11, 88 => 10, 86 => 9, 83 => 8, 80 => 7, 78 => 6, 75 => 5, 72 => 4, 69 => 3, 66 => 2, 47 => 1,);
}
public function getSourceContext()
{
return new Source("{% block layout_breadcrumb_inner %}
{% if category %}
{% set breadcrumbCategories = sw_breadcrumb_full(category, context.context) %}
{% set categoryId = category.id %}
{% if feature('v6.5.0.0') %}
{% set breadcrumbKeys = breadcrumbCategories|keys %}
{% else %}
{# @deprecated tag:v6.5.0 - Use \"sw_breadcrumb_full\" directly. #}
{% set breadcrumb = sw_breadcrumb(category) %}
{# @deprecated tag:v6.5.0 - Use \"sw_breadcrumb_full\" directly. #}
{% set breadcrumbKeys = breadcrumb|keys %}
{# @deprecated tag:v6.5.0 - Use \"sw_breadcrumb_full\" directly. #}
{% set breadcrumbTypes = sw_breadcrumb_build_types(breadcrumbCategories) %}
{% endif %}
{% if breadcrumbCategories|length > 0 %}
<nav aria-label=\"breadcrumb\">
{% block layout_breadcrumb_list %}
<ol class=\"breadcrumb\"
itemscope
itemtype=\"https://schema.org/BreadcrumbList\">
{% for breadcrumbCategory in breadcrumbCategories %}
{% set key = breadcrumbCategory.id %}
{% set name = breadcrumbCategory.translated.name %}
{% block layout_breadcrumb_list_item %}
<li class=\"breadcrumb-item\"
{% if key is same as(categoryId) %}aria-current=\"page\"{% endif %}
itemprop=\"itemListElement\"
itemscope
itemtype=\"https://schema.org/ListItem\">
{% if breadcrumbCategory.type == 'folder' %}
<div itemprop=\"item\">
<div itemprop=\"name\">{{ name }}</div>
</div>
{% else %}
<a href=\"{{ category_url(breadcrumbCategory) }}\"
class=\"breadcrumb-link {% if key is same as(categoryId) %} is-active{% endif %}\"
title=\"{{ name }}\"
{% if category_linknewtab(breadcrumbCategory) %}target=\"_blank\"{% endif %}
itemprop=\"item\">
<link itemprop=\"url\"
href=\"{{ category_url(breadcrumbCategory) }}\"/>
<span class=\"breadcrumb-title\" itemprop=\"name\">{{ name }}</span>
</a>
{% endif %}
<meta itemprop=\"position\" content=\"{{ loop.index }}\"/>
</li>
{% endblock %}
{% block layout_breadcrumb_placeholder %}
{% if key != breadcrumbKeys|last %}
<div class=\"breadcrumb-placeholder\">
{% sw_icon 'arrow-medium-right' style { 'size': 'fluid', 'pack': 'solid'} %}
</div>
{% endif %}
{% endblock %}
{% endfor %}
</ol>
{% endblock %}
</nav>
{% endif %}
{% endif %}
{% endblock %}
", "@Storefront/storefront/layout/breadcrumb.html.twig", "/var/www/html/htdocs/vendor/shopware/storefront/Resources/views/storefront/layout/breadcrumb.html.twig");
}
}