<?php
use Twig\Environment;
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;
/* layout/head/meta/document.html.twig */
class __TwigTemplate_1cd7266098d02408b9e9122f9e953146 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
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", "layout/head/meta/document.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "layout/head/meta/document.html.twig"));
// line 2
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", false, false, false, 2)) {
// line 3
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_title')->getCallable()(), "set", [0 => 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", false, false, false, 3)), ["­" => ""])), "truncate", [0 => 65, 1 => "...", 2 => false], "method", false, false, false, 3)], "method", false, false, false, 3);
// line 4
echo " ";
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", false, false, false, 4))) {
// line 5
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_title')->getCallable()(), "append", [0 => (isset($context["pagename"]) || array_key_exists("pagename", $context) ? $context["pagename"] : (function () { throw new RuntimeError('Variable "pagename" does not exist.', 5, $this->source); })())], "method", false, false, false, 5);
// line 6
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_title')->getCallable()(), "setSeparator", [0 => " | "], "method", false, false, false, 6);
// line 7
echo " ";
}
// line 8
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [0 => "og:title", 1 => 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", false, false, false, 8)), ["­" => ""])), "truncate", [0 => 65, 1 => "...", 2 => false], "method", false, false, false, 8)], "method", false, false, false, 8);
} else {
// line 10
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_title')->getCallable()(), "set", [0 => (isset($context["pagename"]) || array_key_exists("pagename", $context) ? $context["pagename"] : (function () { throw new RuntimeError('Variable "pagename" does not exist.', 10, $this->source); })())], "method", false, false, false, 10);
// line 11
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [0 => "og:title", 1 => (isset($context["pagename"]) || array_key_exists("pagename", $context) ? $context["pagename"] : (function () { throw new RuntimeError('Variable "pagename" does not exist.', 11, $this->source); })())], "method", false, false, false, 11);
}
// line 13
echo "
";
// line 15
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", false, false, false, 15)) {
// line 16
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setDescription", [0 => 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", false, false, false, 16))), "truncate", [0 => 150, 1 => "...", 2 => false], "method", false, false, false, 16)], "method", false, false, false, 16);
// line 17
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [0 => "og:description", 1 => 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", false, false, false, 17))), "truncate", [0 => 150, 1 => "...", 2 => false], "method", false, false, false, 17)], "method", false, false, false, 17);
}
// line 19
echo "
";
// line 21
if ((twig_get_attribute($this->env, $this->source, ($context["document"] ?? null), "getProperty", [0 => "ogImage"], "method", true, true, false, 21) && 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", [0 => "ogImage"], "method", false, false, false, 21))) {
// line 22
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [0 => "og:image", 1 => (twig_get_attribute($this->env, $this->source, twig_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", false, false, false, 22), "getSchemeAndHttpHost", [], "method", false, false, false, 22) . twig_get_attribute($this->env, $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.', 22, $this->source); })()), "getProperty", [0 => "ogImage"], "method", false, false, false, 22), "thumbnail", [0 => "linkedin"], "method", false, false, false, 22))], "method", false, false, false, 22);
} elseif (( // line 23
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); })()))) {
// line 24
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [0 => "og:image", 1 => (twig_get_attribute($this->env, $this->source, twig_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", false, false, false, 24), "getSchemeAndHttpHost", [], "method", false, false, false, 24) . 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", [0 => "linkedin"], "method", false, false, false, 24))], "method", false, false, false, 24);
}
// line 26
echo "
";
// line 28
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [0 => "og:url", 1 => twig_get_attribute($this->env, $this->source, twig_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", false, false, false, 28), "uri", [], "any", false, false, false, 28)], "method", false, false, false, 28);
// line 29
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setProperty", [0 => "og:type", 1 => "website"], "method", false, false, false, 29);
// line 30
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setName", [0 => "robots", 1 => "index, follow"], "method", false, false, false, 30);
// line 31
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_meta')->getCallable()(), "setName", [0 => "language", 1 => twig_get_attribute($this->env, $this->source, twig_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", false, false, false, 31), "locale", [], "any", false, false, false, 31)], "method", false, false, false, 31);
// line 32
echo "
";
// line 34
echo "<link rel=\"canonical\" href=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, twig_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", false, false, false, 34), "uri", [], "any", false, false, false, 34), "html", null, true);
echo "\">";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "layout/head/meta/document.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("{# title #}
{% if document.title %}
{% do pimcore_head_title().set(document.title|striptags|replace({'­': ''})|u.truncate(65, '...', false)) %}
{% if pagename != document.title %}
{% do pimcore_head_title().append(pagename) %}
{% do pimcore_head_title().setSeparator(' | ') %}
{% endif %}
{% do pimcore_head_meta().setProperty('og:title', document.title|striptags|replace({'­': ''})|u.truncate(65, '...', false)) %}
{% else %}
{% do pimcore_head_title().set(pagename) %}
{% do pimcore_head_meta().setProperty('og:title', pagename) %}
{% endif %}
{# description #}
{% if document.description %}
{% do pimcore_head_meta().setDescription(document.description|striptags|u.truncate(150, '...', false)) %}
{% do pimcore_head_meta().setProperty('og:description', document.description|striptags|u.truncate(150, '...', false)) %}
{% endif %}
{# image #}
{% if document.getProperty('ogImage') is defined and document.getProperty('ogImage') %}
{% do pimcore_head_meta().setProperty('og:image', app.request.getSchemeAndHttpHost() ~ document.getProperty('ogImage').thumbnail('linkedin')) %}
{% elseif ogImage is defined and ogImage %}
{% do pimcore_head_meta().setProperty('og:image', app.request.getSchemeAndHttpHost() ~ ogImage.thumbnail('linkedin')) %}
{% endif %}
{# various #}
{% do pimcore_head_meta().setProperty('og:url', app.request.uri) %}
{% do pimcore_head_meta().setProperty('og:type', 'website') %}
{% do pimcore_head_meta().setName('robots', 'index, follow') %}
{% do pimcore_head_meta().setName('language', app.request.locale) %}
{# canonical #}
<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");
}
}