var/cache/dev_h24eaf6979abf10b67456256024eb9e5e/twig/71/717bfd56f158b17b28a133047f85bea622508ffbdffd48df10329f18a1b5f8fd.php line 58

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
  4. use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
  5. use Twig\Error\LoaderError;
  6. use Twig\Error\RuntimeError;
  7. use Twig\Extension\SandboxExtension;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. /* @Storefront/storefront/layout/breadcrumb.html.twig */
  16. class __TwigTemplate_3d82bf97d4fa0360ca3360095f32dd4a extends Template
  17. {
  18.     private $source;
  19.     private $macros = [];
  20.     public function __construct(Environment $env)
  21.     {
  22.         parent::__construct($env);
  23.         $this->source $this->getSourceContext();
  24.         $this->parent false;
  25.         $this->blocks = [
  26.             'layout_breadcrumb_inner' => [$this'block_layout_breadcrumb_inner'],
  27.             'layout_breadcrumb_list' => [$this'block_layout_breadcrumb_list'],
  28.             'layout_breadcrumb_list_item' => [$this'block_layout_breadcrumb_list_item'],
  29.             'layout_breadcrumb_placeholder' => [$this'block_layout_breadcrumb_placeholder'],
  30.         ];
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Storefront/storefront/layout/breadcrumb.html.twig"));
  37.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Storefront/storefront/layout/breadcrumb.html.twig"));
  39.         // line 1
  40.         $this->displayBlock('layout_breadcrumb_inner'$context$blocks);
  41.         
  42.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  43.         
  44.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  45.     }
  46.     public function block_layout_breadcrumb_inner($context, array $blocks = [])
  47.     {
  48.         $macros $this->macros;
  49.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  50.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_breadcrumb_inner"));
  51.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  52.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_breadcrumb_inner"));
  53.         // line 2
  54.         echo "    ";
  55.         if (($context["category"] ?? null)) {
  56.             // line 3
  57.             echo "        ";
  58.             $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"falsefalsefalse3));
  59.             // line 4
  60.             echo "        ";
  61.             $context["categoryId"] = sw_get_attribute($this->env$this->source, ($context["category"] ?? null), "id", [], "any"falsefalsefalse4);
  62.             // line 5
  63.             echo "
  64.         ";
  65.             // line 6
  66.             if ($this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\FeatureFlagExtension']->feature("v6.5.0.0")) {
  67.                 // line 7
  68.                 echo "            ";
  69.                 $context["breadcrumbKeys"] = twig_get_array_keys_filter(($context["breadcrumbCategories"] ?? null));
  70.                 // line 8
  71.                 echo "        ";
  72.             } else {
  73.                 // line 9
  74.                 echo "            ";
  75.                 // line 10
  76.                 echo "            ";
  77.                 $context["breadcrumb"] = $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\BuildBreadcrumbExtension']->buildSeoBreadcrumb($context, ($context["category"] ?? null));
  78.                 // line 11
  79.                 echo "            ";
  80.                 // line 12
  81.                 echo "            ";
  82.                 $context["breadcrumbKeys"] = twig_get_array_keys_filter(($context["breadcrumb"] ?? null));
  83.                 // line 13
  84.                 echo "            ";
  85.                 // line 14
  86.                 echo "            ";
  87.                 $context["breadcrumbTypes"] = $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\BuildBreadcrumbExtension']->buildCategoryTypes(($context["breadcrumbCategories"] ?? null));
  88.                 // line 15
  89.                 echo "        ";
  90.             }
  91.             // line 16
  92.             echo "
  93.         ";
  94.             // line 17
  95.             if ((twig_length_filter($this->env, ($context["breadcrumbCategories"] ?? null)) > 0)) {
  96.                 // line 18
  97.                 echo "            <nav aria-label=\"breadcrumb\">
  98.                 ";
  99.                 // line 19
  100.                 $this->displayBlock('layout_breadcrumb_list'$context$blocks);
  101.                 // line 62
  102.                 echo "            </nav>
  103.         ";
  104.             }
  105.             // line 64
  106.             echo "    ";
  107.         }
  108.         
  109.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  110.         
  111.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  112.     }
  113.     // line 19
  114.     public function block_layout_breadcrumb_list($context, array $blocks = [])
  115.     {
  116.         $macros $this->macros;
  117.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  118.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_breadcrumb_list"));
  119.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  120.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_breadcrumb_list"));
  121.         // line 20
  122.         echo "                    <ol class=\"breadcrumb\"
  123.                         itemscope
  124.                         itemtype=\"https://schema.org/BreadcrumbList\">
  125.                         ";
  126.         // line 23
  127.         $context['_parent'] = $context;
  128.         $context['_seq'] = twig_ensure_traversable(($context["breadcrumbCategories"] ?? null));
  129.         $context['loop'] = [
  130.           'parent' => $context['_parent'],
  131.           'index0' => 0,
  132.           'index'  => 1,
  133.           'first'  => true,
  134.         ];
  135.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  136.             $length count($context['_seq']);
  137.             $context['loop']['revindex0'] = $length 1;
  138.             $context['loop']['revindex'] = $length;
  139.             $context['loop']['length'] = $length;
  140.             $context['loop']['last'] = === $length;
  141.         }
  142.         foreach ($context['_seq'] as $context["_key"] => $context["breadcrumbCategory"]) {
  143.             // line 24
  144.             echo "                            ";
  145.             $context["key"] = sw_get_attribute($this->env$this->source$context["breadcrumbCategory"], "id", [], "any"falsefalsefalse24);
  146.             // line 25
  147.             echo "                            ";
  148.             $context["name"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source$context["breadcrumbCategory"], "translated", [], "any"falsefalsefalse25), "name", [], "any"falsefalsefalse25);
  149.             // line 26
  150.             echo "
  151.                             ";
  152.             // line 27
  153.             $this->displayBlock('layout_breadcrumb_list_item'$context$blocks);
  154.             // line 51
  155.             echo "
  156.                             ";
  157.             // line 52
  158.             $this->displayBlock('layout_breadcrumb_placeholder'$context$blocks);
  159.             // line 59
  160.             echo "                        ";
  161.             ++$context['loop']['index0'];
  162.             ++$context['loop']['index'];
  163.             $context['loop']['first'] = false;
  164.             if (isset($context['loop']['length'])) {
  165.                 --$context['loop']['revindex0'];
  166.                 --$context['loop']['revindex'];
  167.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  168.             }
  169.         }
  170.         $_parent $context['_parent'];
  171.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['breadcrumbCategory'], $context['_parent'], $context['loop']);
  172.         $context array_intersect_key($context$_parent) + $_parent;
  173.         // line 60
  174.         echo "                    </ol>
  175.                 ";
  176.         
  177.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  178.         
  179.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  180.     }
  181.     // line 27
  182.     public function block_layout_breadcrumb_list_item($context, array $blocks = [])
  183.     {
  184.         $macros $this->macros;
  185.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  186.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_breadcrumb_list_item"));
  187.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  188.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_breadcrumb_list_item"));
  189.         // line 28
  190.         echo "                                <li class=\"breadcrumb-item\"
  191.                                     ";
  192.         // line 29
  193.         if ((($context["key"] ?? null) === ($context["categoryId"] ?? null))) {
  194.             echo "aria-current=\"page\"";
  195.         }
  196.         // line 30
  197.         echo "                                    itemprop=\"itemListElement\"
  198.                                     itemscope
  199.                                     itemtype=\"https://schema.org/ListItem\">
  200.                                     ";
  201.         // line 33
  202.         if ((sw_get_attribute($this->env$this->source, ($context["breadcrumbCategory"] ?? null), "type", [], "any"falsefalsefalse33) == "folder")) {
  203.             // line 34
  204.             echo "                                        <div itemprop=\"item\">
  205.                                             <div itemprop=\"name\">";
  206.             // line 35
  207.             echo sw_escape_filter($this->env, ($context["name"] ?? null), "html"nulltrue);
  208.             echo "</div>
  209.                                         </div>
  210.                                     ";
  211.         } else {
  212.             // line 38
  213.             echo "                                        <a href=\"";
  214.             echo $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\CategoryUrlExtension']->getCategoryUrl($context, ($context["breadcrumbCategory"] ?? null));
  215.             echo "\"
  216.                                            class=\"breadcrumb-link ";
  217.             // line 39
  218.             if ((($context["key"] ?? null) === ($context["categoryId"] ?? null))) {
  219.                 echo " is-active";
  220.             }
  221.             echo "\"
  222.                                            title=\"";
  223.             // line 40
  224.             echo sw_escape_filter($this->env, ($context["name"] ?? null), "html"nulltrue);
  225.             echo "\"
  226.                                            ";
  227.             // line 41
  228.             if ($this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\CategoryUrlExtension']->isLinkNewTab(($context["breadcrumbCategory"] ?? null))) {
  229.                 echo "target=\"_blank\"";
  230.             }
  231.             // line 42
  232.             echo "                                           itemprop=\"item\">
  233.                                             <link itemprop=\"url\"
  234.                                                   href=\"";
  235.             // line 44
  236.             echo $this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\CategoryUrlExtension']->getCategoryUrl($context, ($context["breadcrumbCategory"] ?? null));
  237.             echo "\"/>
  238.                                             <span class=\"breadcrumb-title\" itemprop=\"name\">";
  239.             // line 45
  240.             echo sw_escape_filter($this->env, ($context["name"] ?? null), "html"nulltrue);
  241.             echo "</span>
  242.                                         </a>
  243.                                     ";
  244.         }
  245.         // line 48
  246.         echo "                                    <meta itemprop=\"position\" content=\"";
  247.         echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["loop"] ?? null), "index", [], "any"falsefalsefalse48), "html"nulltrue);
  248.         echo "\"/>
  249.                                 </li>
  250.                             ";
  251.         
  252.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  253.         
  254.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  255.     }
  256.     // line 52
  257.     public function block_layout_breadcrumb_placeholder($context, array $blocks = [])
  258.     {
  259.         $macros $this->macros;
  260.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  261.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_breadcrumb_placeholder"));
  262.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  263.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_breadcrumb_placeholder"));
  264.         // line 53
  265.         echo "                                ";
  266.         if ((($context["key"] ?? null) != twig_last($this->env, ($context["breadcrumbKeys"] ?? null)))) {
  267.             // line 54
  268.             echo "                                    <div class=\"breadcrumb-placeholder\">
  269.                                         ";
  270.             // line 55
  271.             ((function () use ($context$blocks) {
  272.                 $finder $this->env->getExtension('Shopware\Core\Framework\Adapter\Twig\Extension\NodeExtension')->getFinder();
  273.                 $includeTemplate $finder->find("@Storefront/storefront/utilities/icon.html.twig");
  274.                 return $this->loadTemplate($includeTemplate ?? null"@Storefront/storefront/layout/breadcrumb.html.twig"55);
  275.             })())->display(twig_array_merge($context, ["size" => "fluid""pack" => "solid""name" => "arrow-medium-right"]));
  276.             // line 56
  277.             echo "                                    </div>
  278.                                 ";
  279.         }
  280.         // line 58
  281.         echo "                            ";
  282.         
  283.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  284.         
  285.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  286.     }
  287.     public function getTemplateName()
  288.     {
  289.         return "@Storefront/storefront/layout/breadcrumb.html.twig";
  290.     }
  291.     public function getDebugInfo()
  292.     {
  293.         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,);
  294.     }
  295.     public function getSourceContext()
  296.     {
  297.         return new Source("{% block layout_breadcrumb_inner %}
  298.     {% if category %}
  299.         {% set breadcrumbCategories = sw_breadcrumb_full(category, context.context) %}
  300.         {% set categoryId = category.id %}
  301.         {% if feature('v6.5.0.0') %}
  302.             {% set breadcrumbKeys = breadcrumbCategories|keys %}
  303.         {% else %}
  304.             {# @deprecated tag:v6.5.0 - Use \"sw_breadcrumb_full\" directly. #}
  305.             {% set breadcrumb = sw_breadcrumb(category) %}
  306.             {# @deprecated tag:v6.5.0 - Use \"sw_breadcrumb_full\" directly. #}
  307.             {% set breadcrumbKeys = breadcrumb|keys %}
  308.             {# @deprecated tag:v6.5.0 - Use \"sw_breadcrumb_full\" directly. #}
  309.             {% set breadcrumbTypes = sw_breadcrumb_build_types(breadcrumbCategories) %}
  310.         {% endif %}
  311.         {% if breadcrumbCategories|length > 0 %}
  312.             <nav aria-label=\"breadcrumb\">
  313.                 {% block layout_breadcrumb_list %}
  314.                     <ol class=\"breadcrumb\"
  315.                         itemscope
  316.                         itemtype=\"https://schema.org/BreadcrumbList\">
  317.                         {% for breadcrumbCategory in breadcrumbCategories %}
  318.                             {% set key = breadcrumbCategory.id %}
  319.                             {% set name = breadcrumbCategory.translated.name %}
  320.                             {% block layout_breadcrumb_list_item %}
  321.                                 <li class=\"breadcrumb-item\"
  322.                                     {% if key is same as(categoryId) %}aria-current=\"page\"{% endif %}
  323.                                     itemprop=\"itemListElement\"
  324.                                     itemscope
  325.                                     itemtype=\"https://schema.org/ListItem\">
  326.                                     {% if breadcrumbCategory.type == 'folder' %}
  327.                                         <div itemprop=\"item\">
  328.                                             <div itemprop=\"name\">{{ name }}</div>
  329.                                         </div>
  330.                                     {% else %}
  331.                                         <a href=\"{{ category_url(breadcrumbCategory) }}\"
  332.                                            class=\"breadcrumb-link {% if key is same as(categoryId) %} is-active{% endif %}\"
  333.                                            title=\"{{ name }}\"
  334.                                            {% if category_linknewtab(breadcrumbCategory) %}target=\"_blank\"{% endif %}
  335.                                            itemprop=\"item\">
  336.                                             <link itemprop=\"url\"
  337.                                                   href=\"{{ category_url(breadcrumbCategory) }}\"/>
  338.                                             <span class=\"breadcrumb-title\" itemprop=\"name\">{{ name }}</span>
  339.                                         </a>
  340.                                     {% endif %}
  341.                                     <meta itemprop=\"position\" content=\"{{ loop.index }}\"/>
  342.                                 </li>
  343.                             {% endblock %}
  344.                             {% block layout_breadcrumb_placeholder %}
  345.                                 {% if key != breadcrumbKeys|last %}
  346.                                     <div class=\"breadcrumb-placeholder\">
  347.                                         {% sw_icon 'arrow-medium-right' style { 'size': 'fluid', 'pack': 'solid'} %}
  348.                                     </div>
  349.                                 {% endif %}
  350.                             {% endblock %}
  351.                         {% endfor %}
  352.                     </ol>
  353.                 {% endblock %}
  354.             </nav>
  355.         {% endif %}
  356.     {% endif %}
  357. {% endblock %}
  358. ""@Storefront/storefront/layout/breadcrumb.html.twig""/var/www/html/htdocs/vendor/shopware/storefront/Resources/views/storefront/layout/breadcrumb.html.twig");
  359.     }
  360. }