var/cache/dev_h35c9e4fa64367e5a564f83803cfdec08/twig/d1/d165ee13f077e0f93dcea079d10ace8c33a7a5aec5d1c32f67c1dd5862332b9c.php line 50

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. /* @AtlSeoUrlManager/storefront/page/product-detail/meta.html.twig */
  16. class __TwigTemplate_6074f5373c8ac4e818be407400983042 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->blocks = [
  25.             'layout_head_canonical' => [$this'block_layout_head_canonical'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 2
  31.         return "@Storefront/storefront/page/product-detail/meta.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@AtlSeoUrlManager/storefront/page/product-detail/meta.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@AtlSeoUrlManager/storefront/page/product-detail/meta.html.twig"));
  40.         $this->parent $this->loadTemplate("@Storefront/storefront/page/product-detail/meta.html.twig""@AtlSeoUrlManager/storefront/page/product-detail/meta.html.twig"2);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 3
  48.     public function block_layout_head_canonical($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_canonical"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""layout_head_canonical"));
  55.         // line 4
  56.         echo "    ";
  57.         $context["canonicalUrl"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse4), "id", [], "any"falsefalsefalse4);
  58.         // line 5
  59.         echo "    ";
  60.         $context["inheritanceOverride"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse5), "translated", [], "any"falsefalsefalse5), "customFields", [], "any"falsefalsefalse5), "atl_seo_url_manager_product_canonical_inheritance_override", [], "any"falsefalsefalse5);
  61.         // line 6
  62.         echo "
  63.     ";
  64.         // line 7
  65.         if (((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse7), "parentId", [], "any"falsefalsefalse7) && $this->extensions['Shopware\Storefront\Framework\Twig\Extension\ConfigExtension']->config($context"AtlSeoUrlManager.config.parentCanonicalUrls")) &&  !($context["inheritanceOverride"] ?? null))) {
  66.             // line 8
  67.             echo "        ";
  68.             $context["canonicalUrl"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse8), "parentId", [], "any"falsefalsefalse8);
  69.             // line 9
  70.             echo "    ";
  71.         } elseif ((sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse9), "canonicalProductId", [], "any"falsefalsefalse9) &&  !$this->extensions['Shopware\Storefront\Framework\Twig\Extension\ConfigExtension']->config($context"AtlSeoUrlManager.config.parentCanonicalUrls"))) {
  72.             // line 10
  73.             echo "        ";
  74.             $context["canonicalUrl"] = sw_get_attribute($this->env$this->sourcesw_get_attribute($this->env$this->source, ($context["page"] ?? null), "product", [], "any"falsefalsefalse10), "canonicalProductId", [], "any"falsefalsefalse10);
  75.             // line 11
  76.             echo "    ";
  77.         }
  78.         // line 12
  79.         echo "
  80.     <link rel=\"canonical\" href=\"";
  81.         // line 13
  82.         echo sw_escape_filter($this->env$this->extensions['Shopware\Core\Framework\Adapter\Twig\Extension\SeoUrlFunctionExtension']->seoUrl("frontend.detail.page", ["productId" => ($context["canonicalUrl"] ?? null)]), "html"nulltrue);
  83.         echo "\" />
  84. ";
  85.         
  86.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  87.         
  88.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  89.     }
  90.     public function getTemplateName()
  91.     {
  92.         return "@AtlSeoUrlManager/storefront/page/product-detail/meta.html.twig";
  93.     }
  94.     public function isTraitable()
  95.     {
  96.         return false;
  97.     }
  98.     public function getDebugInfo()
  99.     {
  100.         return array (  94 => 13,  91 => 12,  88 => 11,  85 => 10,  82 => 9,  79 => 8,  77 => 7,  74 => 6,  71 => 5,  68 => 4,  58 => 3,  35 => 2,);
  101.     }
  102.     public function getSourceContext()
  103.     {
  104.         return new Source("{% sw_extends '@Storefront/storefront/page/product-detail/meta.html.twig' %}
  105. {% block layout_head_canonical %}
  106.     {% set canonicalUrl = page.product.id %}
  107.     {% set inheritanceOverride = page.product.translated.customFields.atl_seo_url_manager_product_canonical_inheritance_override %}
  108.     {% if page.product.parentId and config('AtlSeoUrlManager.config.parentCanonicalUrls') and not inheritanceOverride %}
  109.         {% set canonicalUrl = page.product.parentId %}
  110.     {% elseif page.product.canonicalProductId and not config('AtlSeoUrlManager.config.parentCanonicalUrls') %}
  111.         {% set canonicalUrl = page.product.canonicalProductId %}
  112.     {% endif %}
  113.     <link rel=\"canonical\" href=\"{{ seoUrl('frontend.detail.page', { productId: canonicalUrl }) }}\" />
  114. {% endblock %}
  115. ""@AtlSeoUrlManager/storefront/page/product-detail/meta.html.twig""/var/customers/webs/kew/htdocs6/vendor/store.shopware.com/atlseourlmanager/src/Resources/views/storefront/page/product-detail/meta.html.twig");
  116.     }
  117. }