var/cache/dev/twig/b5/b535140fea875c326edfbe6354eba04f.php line 33

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. /* layout/head/meta/document.html.twig */
  14. class __TwigTemplate_1cd7266098d02408b9e9122f9e953146 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.         ];
  25.     }
  26.     protected function doDisplay(array $context, array $blocks = [])
  27.     {
  28.         $macros $this->macros;
  29.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  30.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""layout/head/meta/document.html.twig"));
  31.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  32.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""layout/head/meta/document.html.twig"));
  33.         // line 2
  34.         if (twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'2$this->source); })()), "title", [], "any"falsefalsefalse2)) {
  35.             // line 3
  36.             echo "    ";
  37.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_title')->getCallable()(), "set", [=> twig_get_attribute($this->env$this->source$this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString(twig_replace_filter(twig_striptags(twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'3$this->source); })()), "title", [], "any"falsefalsefalse3)), ["&shy;" => ""])), "truncate", [=> 65=> "..."=> false], "method"falsefalsefalse3)], "method"falsefalsefalse3);
  38.             // line 4
  39.             echo "    ";
  40.             if (((isset($context["pagename"]) || array_key_exists("pagename"$context) ? $context["pagename"] : (function () { throw new RuntimeError('Variable "pagename" does not exist.'4$this->source); })()) != twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'4$this->source); })()), "title", [], "any"falsefalsefalse4))) {
  41.                 // line 5
  42.                 echo "        ";
  43.                 twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_title')->getCallable()(), "append", [=> (isset($context["pagename"]) || array_key_exists("pagename"$context) ? $context["pagename"] : (function () { throw new RuntimeError('Variable "pagename" does not exist.'5$this->source); })())], "method"falsefalsefalse5);
  44.                 // line 6
  45.                 echo "        ";
  46.                 twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_title')->getCallable()(), "setSeparator", [=> " | "], "method"falsefalsefalse6);
  47.                 // line 7
  48.                 echo "    ";
  49.             }
  50.             // line 8
  51.             echo "    ";
  52.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [=> "og:title"=> twig_get_attribute($this->env$this->source$this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString(twig_replace_filter(twig_striptags(twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'8$this->source); })()), "title", [], "any"falsefalsefalse8)), ["&shy;" => ""])), "truncate", [=> 65=> "..."=> false], "method"falsefalsefalse8)], "method"falsefalsefalse8);
  53.         } else {
  54.             // line 10
  55.             echo "    ";
  56.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_title')->getCallable()(), "set", [=> (isset($context["pagename"]) || array_key_exists("pagename"$context) ? $context["pagename"] : (function () { throw new RuntimeError('Variable "pagename" does not exist.'10$this->source); })())], "method"falsefalsefalse10);
  57.             // line 11
  58.             echo "    ";
  59.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [=> "og:title"=> (isset($context["pagename"]) || array_key_exists("pagename"$context) ? $context["pagename"] : (function () { throw new RuntimeError('Variable "pagename" does not exist.'11$this->source); })())], "method"falsefalsefalse11);
  60.         }
  61.         // line 13
  62.         echo "
  63. ";
  64.         // line 15
  65.         if (twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'15$this->source); })()), "description", [], "any"falsefalsefalse15)) {
  66.             // line 16
  67.             echo "    ";
  68.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setDescription", [=> twig_get_attribute($this->env$this->source$this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString(twig_striptags(twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'16$this->source); })()), "description", [], "any"falsefalsefalse16))), "truncate", [=> 150=> "..."=> false], "method"falsefalsefalse16)], "method"falsefalsefalse16);
  69.             // line 17
  70.             echo "    ";
  71.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [=> "og:description"=> twig_get_attribute($this->env$this->source$this->extensions['Twig\Extra\String\StringExtension']->createUnicodeString(twig_striptags(twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'17$this->source); })()), "description", [], "any"falsefalsefalse17))), "truncate", [=> 150=> "..."=> false], "method"falsefalsefalse17)], "method"falsefalsefalse17);
  72.         }
  73.         // line 19
  74.         echo "
  75. ";
  76.         // line 21
  77.         if ((twig_get_attribute($this->env$this->source, ($context["document"] ?? null), "getProperty", [=> "ogImage"], "method"truetruefalse21) && twig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'21$this->source); })()), "getProperty", [=> "ogImage"], "method"falsefalsefalse21))) {
  78.             // line 22
  79.             echo "    ";
  80.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [=> "og:image"=> (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'22$this->source); })()), "request", [], "any"falsefalsefalse22), "getSchemeAndHttpHost", [], "method"falsefalsefalse22) . twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["document"]) || array_key_exists("document"$context) ? $context["document"] : (function () { throw new RuntimeError('Variable "document" does not exist.'22$this->source); })()), "getProperty", [=> "ogImage"], "method"falsefalsefalse22), "thumbnail", [=> "linkedin"], "method"falsefalsefalse22))], "method"falsefalsefalse22);
  81.         } elseif ((        // line 23
  82. array_key_exists("ogImage"$context) && (isset($context["ogImage"]) || array_key_exists("ogImage"$context) ? $context["ogImage"] : (function () { throw new RuntimeError('Variable "ogImage" does not exist.'23$this->source); })()))) {
  83.             // line 24
  84.             echo "    ";
  85.             twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [=> "og:image"=> (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'24$this->source); })()), "request", [], "any"falsefalsefalse24), "getSchemeAndHttpHost", [], "method"falsefalsefalse24) . twig_get_attribute($this->env$this->source, (isset($context["ogImage"]) || array_key_exists("ogImage"$context) ? $context["ogImage"] : (function () { throw new RuntimeError('Variable "ogImage" does not exist.'24$this->source); })()), "thumbnail", [=> "linkedin"], "method"falsefalsefalse24))], "method"falsefalsefalse24);
  86.         }
  87.         // line 26
  88.         echo "
  89. ";
  90.         // line 28
  91.         twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [=> "og:url"=> twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'28$this->source); })()), "request", [], "any"falsefalsefalse28), "uri", [], "any"falsefalsefalse28)], "method"falsefalsefalse28);
  92.         // line 29
  93.         twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [=> "og:type"=> "website"], "method"falsefalsefalse29);
  94.         // line 30
  95.         twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setName", [=> "robots"=> "index, follow"], "method"falsefalsefalse30);
  96.         // line 31
  97.         twig_get_attribute($this->env$this->source$this->env->getFunction('pimcore_head_meta')->getCallable()(), "setName", [=> "language"=> twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'31$this->source); })()), "request", [], "any"falsefalsefalse31), "locale", [], "any"falsefalsefalse31)], "method"falsefalsefalse31);
  98.         // line 32
  99.         echo "
  100. ";
  101.         // line 34
  102.         echo "<link rel=\"canonical\" href=\"";
  103.         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'34$this->source); })()), "request", [], "any"falsefalsefalse34), "uri", [], "any"falsefalsefalse34), "html"nulltrue);
  104.         echo "\">";
  105.         
  106.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  107.         
  108.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  109.     }
  110.     public function getTemplateName()
  111.     {
  112.         return "layout/head/meta/document.html.twig";
  113.     }
  114.     public function isTraitable()
  115.     {
  116.         return false;
  117.     }
  118.     public function getDebugInfo()
  119.     {
  120.         return array (  111 => 34,  108 => 32,  106 => 31,  104 => 30,  102 => 29,  100 => 28,  97 => 26,  93 => 24,  91 => 23,  88 => 22,  86 => 21,  83 => 19,  79 => 17,  76 => 16,  74 => 15,  71 => 13,  67 => 11,  64 => 10,  60 => 8,  57 => 7,  54 => 6,  51 => 5,  48 => 4,  45 => 3,  43 => 2,);
  121.     }
  122.     public function getSourceContext()
  123.     {
  124.         return new Source("{# title #}
  125. {% if document.title %}
  126.     {% do pimcore_head_title().set(document.title|striptags|replace({'&shy;': ''})|u.truncate(65, '...', false)) %}
  127.     {% if pagename != document.title %}
  128.         {% do pimcore_head_title().append(pagename) %}
  129.         {% do pimcore_head_title().setSeparator(' | ') %}
  130.     {% endif %}
  131.     {% do pimcore_head_meta().setProperty('og:title', document.title|striptags|replace({'&shy;': ''})|u.truncate(65, '...', false)) %}
  132. {% else %}
  133.     {% do pimcore_head_title().set(pagename) %}
  134.     {% do pimcore_head_meta().setProperty('og:title', pagename) %}
  135. {% endif %}
  136. {# description #}
  137. {% if document.description %}
  138.     {% do pimcore_head_meta().setDescription(document.description|striptags|u.truncate(150, '...', false)) %}
  139.     {% do pimcore_head_meta().setProperty('og:description', document.description|striptags|u.truncate(150, '...', false)) %}
  140. {% endif %}
  141. {# image #}
  142. {% if document.getProperty('ogImage') is defined and document.getProperty('ogImage') %}
  143.     {% do pimcore_head_meta().setProperty('og:image', app.request.getSchemeAndHttpHost() ~ document.getProperty('ogImage').thumbnail('linkedin')) %}
  144. {% elseif ogImage is defined and ogImage %}
  145.     {% do pimcore_head_meta().setProperty('og:image', app.request.getSchemeAndHttpHost() ~ ogImage.thumbnail('linkedin')) %}
  146. {% endif %}
  147. {# various #}
  148. {% do pimcore_head_meta().setProperty('og:url', app.request.uri) %}
  149. {% do pimcore_head_meta().setProperty('og:type', 'website') %}
  150. {% do pimcore_head_meta().setName('robots', 'index, follow') %}
  151. {% do pimcore_head_meta().setName('language', app.request.locale) %}
  152. {# canonical #}
  153. <link rel=\"canonical\" href=\"{{ app.request.uri }}\">""layout/head/meta/document.html.twig""/home/httpd/vhosts/a4interactive.ch/httpdocs/lutisbach.a4interactive.ch/templates/layout/head/meta/document.html.twig");
  154.     }
  155. }