var/cache/website/dev/twig/6d/6d15f953d23a776af6e0b608175025e23cb3093d2f26ca32d00a98a921b873b2.php line 52

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @SuluWebsite/Extension/seo.html.twig */
  14. class __TwigTemplate_b766c48ffb405c47e9da2519e03d5477e137041f05088494b4f4dd3da82110bf extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->parent false;
  23.         $this->blocks = [
  24.             'title' => [$this'block_title'],
  25.             'description' => [$this'block_description'],
  26.             'keywords' => [$this'block_keywords'],
  27.             'robots' => [$this'block_robots'],
  28.             'urls' => [$this'block_urls'],
  29.             'canonical' => [$this'block_canonical'],
  30.         ];
  31.     }
  32.     protected function doDisplay(array $context, array $blocks = [])
  33.     {
  34.         $macros $this->macros;
  35.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  36.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SuluWebsite/Extension/seo.html.twig"));
  37.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  38.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@SuluWebsite/Extension/seo.html.twig"));
  39.         // line 8
  40.         if ( !array_key_exists("localizations"$context)) {
  41.             // line 9
  42.             echo "    ";
  43.             @trigger_error("The \"urls\" variable is deprecated, set \"localizations\" instead in the \"seo.html.twig\"."." (\"@SuluWebsite/Extension/seo.html.twig\" at line 9)."E_USER_DEPRECATED);
  44.             // line 10
  45.             echo "    ";
  46.             $context["localizations"] = [];
  47.             // line 11
  48.             echo "    ";
  49.             $context['_parent'] = $context;
  50.             $context['_seq'] = twig_ensure_traversable(($context["urls"] ?? null));
  51.             foreach ($context['_seq'] as $context["locale"] => $context["url"]) {
  52.                 // line 12
  53.                 echo "        ";
  54.                 $context["localizations"] = twig_array_merge(($context["localizations"] ?? null), [                // line 13
  55. $context["locale"] => ["locale" =>                 // line 14
  56. $context["locale"], "url" => $this->extensions['Sulu\Bundle\WebsiteBundle\Twig\Content\ContentPathTwigExtension']->getContentPath(                // line 15
  57. $context["url"], null$context["locale"])]]);
  58.                 // line 18
  59.                 echo "    ";
  60.             }
  61.             $_parent $context['_parent'];
  62.             unset($context['_seq'], $context['_iterated'], $context['locale'], $context['url'], $context['_parent'], $context['loop']);
  63.             $context array_intersect_key($context$_parent) + $_parent;
  64.         }
  65.         // line 22
  66.         $context["seo"] = twig_array_merge(((array_key_exists("seo"$context)) ? (_twig_default_filter(($context["seo"] ?? null), [])) : ([])), ((twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse22), "attributes", [], "any"falsetruefalse22), "get", [=> "_seo"=> []], "method"truetruefalse22)) ? (_twig_default_filter(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsetruefalse22), "attributes", [], "any"falsetruefalse22), "get", [=> "_seo"=> []], "method"falsefalsefalse22), [])) : ([])));
  67.         // line 25
  68.         $context["seoTitle"] = ((twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "title", [], "any"truetruefalse25)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "title", [], "any"falsefalsefalse25), ((twig_get_attribute($this->env$this->source, ($context["content"] ?? null), "title", [], "any"truetruefalse25)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["content"] ?? null), "title", [], "any"falsefalsefalse25))) : ("")))) : (((twig_get_attribute($this->env$this->source, ($context["content"] ?? null), "title", [], "any"truetruefalse25)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["content"] ?? null), "title", [], "any"falsefalsefalse25))) : (""))));
  69.         // line 26
  70.         $context["seoDescription"] = ((twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "description", [], "any"truetruefalse26)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "description", [], "any"falsefalsefalse26))) : (""));
  71.         // line 27
  72.         $context["seoKeywords"] = ((twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "keywords", [], "any"truetruefalse27)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "keywords", [], "any"falsefalsefalse27))) : (""));
  73.         // line 28
  74.         echo "
  75. ";
  76.         // line 29
  77.         $context["seoRobots"] = "";
  78.         // line 30
  79.         if (((twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "noIndex", [], "any"truetruefalse30)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "noIndex", [], "any"falsefalsefalse30), false)) : (false))) {
  80.             // line 31
  81.             $context["seoRobots"] = (($context["seoRobots"] ?? null) . "noIndex");
  82.         } else {
  83.             // line 33
  84.             $context["seoRobots"] = (($context["seoRobots"] ?? null) . "index");
  85.         }
  86.         // line 35
  87.         if (((twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "noFollow", [], "any"truetruefalse35)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "noFollow", [], "any"falsefalsefalse35), false)) : (false))) {
  88.             // line 36
  89.             $context["seoRobots"] = (($context["seoRobots"] ?? null) . ",noFollow");
  90.         } else {
  91.             // line 38
  92.             $context["seoRobots"] = (($context["seoRobots"] ?? null) . ",follow");
  93.         }
  94.         // line 41
  95.         $context["seoCanonical"] = ((twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "canonicalUrl", [], "any"truetruefalse41)) ? (_twig_default_filter(twig_get_attribute($this->env$this->source, ($context["seo"] ?? null), "canonicalUrl", [], "any"falsefalsefalse41))) : (""));
  96.         // line 43
  97.         if ((( !($context["seoCanonical"] ?? null) && ($context["shadowBaseLocale"] ?? null)) && ((twig_get_attribute($this->env$this->source, ($context["localizations"] ?? null), ($context["shadowBaseLocale"] ?? null), [], "array"truetruefalse43)) ? (_twig_default_filter((($__internal_compile_0 = ($context["localizations"] ?? null)) && is_array($__internal_compile_0) || $__internal_compile_0 instanceof ArrayAccess ? ($__internal_compile_0[($context["shadowBaseLocale"] ?? null)] ?? null) : null))) : ("")))) {
  98.             // line 44
  99.             echo "    ";
  100.             $context["seoCanonical"] = twig_get_attribute($this->env$this->source, (($__internal_compile_1 = ($context["localizations"] ?? null)) && is_array($__internal_compile_1) || $__internal_compile_1 instanceof ArrayAccess ? ($__internal_compile_1[($context["shadowBaseLocale"] ?? null)] ?? null) : null), "url", [], "any"falsefalsefalse44);
  101.         }
  102.         // line 49
  103.         $this->displayBlock('title'$context$blocks);
  104.         // line 55
  105.         $this->displayBlock('description'$context$blocks);
  106.         // line 61
  107.         $this->displayBlock('keywords'$context$blocks);
  108.         // line 67
  109.         $this->displayBlock('robots'$context$blocks);
  110.         // line 73
  111.         $this->displayBlock('urls'$context$blocks);
  112.         // line 84
  113.         $this->displayBlock('canonical'$context$blocks);
  114.         
  115.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  116.         
  117.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  118.     }
  119.     // line 49
  120.     public function block_title($context, array $blocks = [])
  121.     {
  122.         $macros $this->macros;
  123.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  124.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  125.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  126.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""title"));
  127.         // line 50
  128.         if (($context["seoTitle"] ?? null)) {
  129.             // line 51
  130.             echo "<title>";
  131.             echo twig_escape_filter($this->env, ($context["seoTitle"] ?? null), "html"nulltrue);
  132.             echo "</title>";
  133.         }
  134.         
  135.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  136.         
  137.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  138.     }
  139.     // line 55
  140.     public function block_description($context, array $blocks = [])
  141.     {
  142.         $macros $this->macros;
  143.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  144.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""description"));
  145.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  146.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""description"));
  147.         // line 56
  148.         if (($context["seoDescription"] ?? null)) {
  149.             // line 57
  150.             echo "<meta name=\"description\" content=\"";
  151.             echo twig_escape_filter($this->env, ($context["seoDescription"] ?? null), "html"nulltrue);
  152.             echo "\"/>";
  153.         }
  154.         
  155.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  156.         
  157.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  158.     }
  159.     // line 61
  160.     public function block_keywords($context, array $blocks = [])
  161.     {
  162.         $macros $this->macros;
  163.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  164.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""keywords"));
  165.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  166.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""keywords"));
  167.         // line 62
  168.         if (($context["seoKeywords"] ?? null)) {
  169.             // line 63
  170.             echo "<meta name=\"keywords\" content=\"";
  171.             echo twig_escape_filter($this->env, ($context["seoKeywords"] ?? null), "html"nulltrue);
  172.             echo "\"/>";
  173.         }
  174.         
  175.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  176.         
  177.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  178.     }
  179.     // line 67
  180.     public function block_robots($context, array $blocks = [])
  181.     {
  182.         $macros $this->macros;
  183.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  184.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""robots"));
  185.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  186.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""robots"));
  187.         // line 68
  188.         if (($context["seoRobots"] ?? null)) {
  189.             // line 69
  190.             echo "<meta name=\"robots\" content=\"";
  191.             echo twig_escape_filter($this->env, ($context["seoRobots"] ?? null), "html"nulltrue);
  192.             echo "\"/>";
  193.         }
  194.         
  195.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  196.         
  197.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  198.     }
  199.     // line 73
  200.     public function block_urls($context, array $blocks = [])
  201.     {
  202.         $macros $this->macros;
  203.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  204.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""urls"));
  205.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  206.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""urls"));
  207.         // line 75
  208.         if ((twig_length_filter($this->env, ($context["localizations"] ?? null)) > 1)) {
  209.             // line 76
  210.             $context['_parent'] = $context;
  211.             $context['_seq'] = twig_ensure_traversable(($context["localizations"] ?? null));
  212.             foreach ($context['_seq'] as $context["_key"] => $context["localization"]) {
  213.                 // line 77
  214.                 if (( !twig_get_attribute($this->env$this->source$context["localization"], "alternate", [], "any"truetruefalse77) || twig_get_attribute($this->env$this->source$context["localization"], "alternate", [], "any"falsefalsefalse77))) {
  215.                     // line 78
  216.                     echo "<link rel=\"alternate\" href=\"";
  217.                     echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["localization"], "url", [], "any"falsefalsefalse78), "html"nulltrue);
  218.                     echo "\" hreflang=\"";
  219.                     echo twig_escape_filter($this->envtwig_replace_filter(twig_get_attribute($this->env$this->source$context["localization"], "locale", [], "any"falsefalsefalse78), ["_" => "-"]), "html"nulltrue);
  220.                     echo "\"/>";
  221.                 }
  222.             }
  223.             $_parent $context['_parent'];
  224.             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['localization'], $context['_parent'], $context['loop']);
  225.             $context array_intersect_key($context$_parent) + $_parent;
  226.         }
  227.         
  228.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  229.         
  230.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  231.     }
  232.     // line 84
  233.     public function block_canonical($context, array $blocks = [])
  234.     {
  235.         $macros $this->macros;
  236.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  237.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""canonical"));
  238.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  239.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""canonical"));
  240.         // line 86
  241.         echo "<link rel=\"canonical\" href=\"";
  242.         echo twig_escape_filter($this->env, ((array_key_exists("seoCanonical"$context)) ? (_twig_default_filter(($context["seoCanonical"] ?? null), twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsefalsefalse86), "uri", [], "any"falsefalsefalse86))) : (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, ($context["app"] ?? null), "request", [], "any"falsefalsefalse86), "uri", [], "any"falsefalsefalse86))), "html"nulltrue);
  243.         echo "\"/>";
  244.         
  245.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
  246.         
  247.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  248.     }
  249.     public function getTemplateName()
  250.     {
  251.         return "@SuluWebsite/Extension/seo.html.twig";
  252.     }
  253.     public function isTraitable()
  254.     {
  255.         return false;
  256.     }
  257.     public function getDebugInfo()
  258.     {
  259.         return array (  280 => 86,  270 => 84,  250 => 78,  248 => 77,  244 => 76,  242 => 75,  232 => 73,  219 => 69,  217 => 68,  207 => 67,  194 => 63,  192 => 62,  182 => 61,  169 => 57,  167 => 56,  157 => 55,  144 => 51,  142 => 50,  132 => 49,  122 => 84,  120 => 73,  118 => 67,  116 => 61,  114 => 55,  112 => 49,  108 => 44,  106 => 43,  104 => 41,  101 => 38,  98 => 36,  96 => 35,  93 => 33,  90 => 31,  88 => 30,  86 => 29,  83 => 28,  81 => 27,  79 => 26,  77 => 25,  75 => 22,  68 => 18,  66 => 15,  65 => 14,  64 => 13,  62 => 12,  57 => 11,  54 => 10,  51 => 9,  49 => 8,);
  260.     }
  261.     public function getSourceContext()
  262.     {
  263.         return new Source("{#-
  264.  # content array
  265.  # seo array
  266.  # shadowBaseLocale string
  267.  # localizations array
  268. -#}
  269. {% if localizations is not defined %}
  270.     {% deprecated 'The \"urls\" variable is deprecated, set \"localizations\" instead in the \"seo.html.twig\".' %}
  271.     {% set localizations = {} %}
  272.     {% for locale, url in urls %}
  273.         {% set localizations = localizations|merge({
  274.             (locale): {
  275.                 locale: locale,
  276.                 url: sulu_content_path(url, null, locale),
  277.             }
  278.         }) %}
  279.     {% endfor %}
  280. {% endif %}
  281. {#- merge seo data with _seo from attributes for custom urls -#}
  282. {% set seo = seo|default([])|merge(app.request.attributes.get('_seo', [])|default([])) %}
  283. {#- fallback to content title when no seo title is set -#}
  284. {% set seoTitle = seo.title|default(content.title|default()) %}
  285. {% set seoDescription = seo.description|default() %}
  286. {% set seoKeywords = seo.keywords|default() %}
  287. {% set seoRobots = '' %}
  288. {%- if seo.noIndex|default(false) -%}
  289.     {% set seoRobots = seoRobots ~ 'noIndex' -%}
  290. {%- else -%}
  291.     {% set seoRobots = seoRobots ~ 'index' -%}
  292. {%- endif -%}
  293. {%- if seo.noFollow|default(false) -%}
  294.     {% set seoRobots = seoRobots ~ ',noFollow' -%}
  295. {%- else -%}
  296.     {% set seoRobots = seoRobots ~ ',follow' -%}
  297. {%- endif -%}
  298. {% set seoCanonical = seo.canonicalUrl|default() %}
  299. {%- if not seoCanonical and shadowBaseLocale and localizations[shadowBaseLocale]|default() %}
  300.     {% set seoCanonical = localizations[shadowBaseLocale].url %}
  301. {%- endif -%}
  302. {#- render blocks -#}
  303. {%- block title -%}
  304.     {%- if seoTitle -%}
  305.         <title>{{ seoTitle }}</title>
  306.     {%- endif -%}
  307. {%- endblock -%}
  308. {%- block description -%}
  309.     {%- if seoDescription -%}
  310.         <meta name=\"description\" content=\"{{ seoDescription }}\"/>
  311.     {%- endif -%}
  312. {%- endblock -%}
  313. {%- block keywords -%}
  314.     {%- if seoKeywords -%}
  315.         <meta name=\"keywords\" content=\"{{ seoKeywords }}\"/>
  316.     {%- endif -%}
  317. {%- endblock -%}
  318. {%- block robots -%}
  319.     {%- if seoRobots -%}
  320.         <meta name=\"robots\" content=\"{{ seoRobots }}\"/>
  321.     {%- endif -%}
  322. {%- endblock -%}
  323. {%- block urls -%}
  324.     {#- when only one language do not show alternative -#}
  325.     {%- if localizations|length > 1 -%}
  326.         {%- for localization in localizations -%}
  327.             {%- if localization.alternate is not defined or localization.alternate -%}
  328.                 <link rel=\"alternate\" href=\"{{ localization.url }}\" hreflang=\"{{ localization.locale|replace({'_': '-'}) }}\"/>
  329.             {%- endif -%}
  330.         {%- endfor -%}
  331.     {%- endif -%}
  332. {%- endblock -%}
  333. {%- block canonical -%}
  334.     {#- Set canonical to itself if a bot clone the page -#}
  335.     <link rel=\"canonical\" href=\"{{ seoCanonical|default(app.request.uri) }}\"/>
  336. {%- endblock -%}
  337. ""@SuluWebsite/Extension/seo.html.twig""/home/clients/6069f7d890ad1893915d376cf7e5b903/var/www/bn-invest-commercial/vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Resources/views/Extension/seo.html.twig");
  338.     }
  339. }