<?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;
/* @ElementsDemiFrontend/Includes/layout/head.html.twig */
class __TwigTemplate_82ffeb2bc140a2231efde16b6f8f932e 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", "@ElementsDemiFrontend/Includes/layout/head.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@ElementsDemiFrontend/Includes/layout/head.html.twig"));
// line 1
echo "<meta charset=\"UTF-8\">
";
// line 2
if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 2, $this->source); })())) {
// line 3
echo " ";
echo $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsHeadTitle();
echo "
";
// line 4
echo $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsHeadMeta();
echo "
";
// line 5
echo $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsCanonical();
echo "
";
// line 6
if ( !((array_key_exists("deactivateHrefland", $context)) ? (_twig_default_filter((isset($context["deactivateHrefland"]) || array_key_exists("deactivateHrefland", $context) ? $context["deactivateHrefland"] : (function () { throw new RuntimeError('Variable "deactivateHrefland" does not exist.', 6, $this->source); })()), false)) : (false))) {
// line 7
echo " ";
echo $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsHreflang();
echo "
";
}
// line 9
echo "
";
// line 10
$context["img"] = $this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getOgImage", []);
// line 11
echo " ";
if ( !(null === (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 11, $this->source); })()))) {
// line 12
echo " ";
twig_get_attribute($this->env, $this->source, $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsOpenGraph(), "addImage", [0 => (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.', 12, $this->source); })()), "request", [], "any", false, false, false, 12), "getHost", [], "method", false, false, false, 12) . twig_get_attribute($this->env, $this->source, (isset($context["img"]) || array_key_exists("img", $context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.', 12, $this->source); })()), "getThumbnail", [0 => "ogimages"], "method", false, false, false, 12))], "method", false, false, false, 12);
// line 13
echo " ";
}
// line 14
echo " ";
echo $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsOpenGraph();
echo "
";
}
// line 16
echo "
<!-- prevent underline numbers in edge -->
<meta name=\"format-detection\" content=\"telephone=no\"/>
<link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"/static/img/favicons/apple-touch-icon-152x152.png\">
<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/static/img/favicons/apple-touch-icon-180x180.png\">
<link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/favicon-32x32.png\" sizes=\"32x32\">
<link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/android-chrome-192x192.png\" sizes=\"192x192\">
<link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/favicon-96x96.png\" sizes=\"96x96\">
<link rel=\"manifest\" href=\"/manifest.json\">
<link rel=\"mask-icon\" href=\"/static/img/favicons/safari-pinned-tab.svg\">
";
// line 28
if (twig_get_attribute($this->env, $this->source, Pimcore\Tool\DeviceDetector::getInstance(), "isTablet", [], "method", false, false, false, 28)) {
// line 29
echo " <meta name=\"viewport\" content=\"user-scalable=no\">
";
} else {
// line 31
echo " <meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0\">
";
}
// line 33
echo "
";
// line 35
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/layout/headCss.html.twig");
echo "
";
// line 36
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 36, $this->source); })())) {
// line 37
echo " <link rel=\"stylesheet\" href=\"/static/css/editmode.css\">
";
}
// line 39
echo "
<script type=\"text/javascript\" data-cookieconsent=\"ignore\">
var supportsWoff2=function(){if(!(\"FontFace\"in window))return!1;var e=new window.FontFace(\"t\",'url( \"data:application/font-woff2,\" ) format( \"woff2\" )',{});return e.load()[\"catch\"](function(){})};!function(){\"use strict\";function e(){var e=navigator.userAgent.toLowerCase();return-1!=e.indexOf(\"msie\")&&8==parseInt(e.split(\"msie\")[1])?\"ie8\":supportsWoff2()?\"blink\":\"default\"}function t(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent(\"on\"+t,n)}function n(e){if(window.XMLHttpRequest){var n=new XMLHttpRequest,i=e[1]+\"?dc=\"+e[0].split(\"--\")[0];n.open(\"GET\",i,!0),t(n,\"load\",function(){4===n.readyState&&a(n.responseText,e[0])}),n.send()}else{var o=document.createElement(\"link\");o.href=e[1],o.rel=\"stylesheet\",o.type=\"text/css\",document.getElementsByTagName(\"head\")[0].appendChild(o),document.cookie=e[0]}}function a(t,n){if(document.getElementById(n)&&\"ie8\"!=e())document.getElementById(n).innerHTML=t;else{var a=document.createElement(\"style\");a.innerHTML=t,document.getElementsByTagName(\"head\")[0].appendChild(a)}}var i=[];if(\"ie8\"!==e()){for(var o=document.getElementsByClassName(\"js-style\"),r=0;r<o.length;r++)o[r].getAttribute(\"data-font\")?i.push([o[r].getAttribute(\"id\"),o[r].getAttribute(\"data-href\")+e()+\".css\"]):i.push([o[r].getAttribute(\"id\"),o[r].getAttribute(\"data-href\")]);for(var s in i)if(\"ie8\"==e()){var d=document.createElement(\"link\");d.href=i[s][1],d.rel=\"stylesheet\",d.type=\"text/css\",document.getElementsByTagName(\"head\")[0].appendChild(d)}else t(window,\"load\",n(i[s]))}}();
</script>
";
// line 44
if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 44, $this->source); })())) {
// line 45
echo " <script id=\"Cookiebot\" src=\"https://consent.cookiebot.com/uc.js\" data-cbid=\"1ade52b6-e8d9-4dc2-92e0-3c43c1fd8cd4\" data-blockingmode=\"auto\" type=\"text/javascript\"></script>
";
}
// line 47
echo "
";
// line 48
echo twig_include($this->env, $context, "@ElementsDemiFrontend/Includes/layout/js-config.html.twig");
echo "
";
// line 50
$context["route"] = 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.', 50, $this->source); })()), "request", [], "any", false, false, false, 50), "get", [0 => "_route"], "method", false, false, false, 50);
// line 51
echo "
";
// line 52
if (twig_in_filter( !"demi_checkout", (isset($context["route"]) || array_key_exists("route", $context) ? $context["route"] : (function () { throw new RuntimeError('Variable "route" does not exist.', 52, $this->source); })()))) {
// line 53
echo " ";
} else {
// line 55
echo " ";
twig_get_attribute($this->env, $this->source, $this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig("_initialState"), "add", [0 => $this->env->getFunction('demi_getSearchArray')->getCallable()()], "method", false, false, false, 55);
}
// line 57
echo "
";
// line 71
echo "
";
// line 73
twig_get_attribute($this->env, $this->source, $this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig("_translations"), "add", [0 => $this->env->getFunction('demi_getAllDemiTranslationKeys')->getCallable()()], "method", false, false, false, 73);
// line 74
echo "
";
// line 76
$context["local"] = ((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.', 76, $this->source); })()), "request", [], "any", false, false, false, 76), "locale", [], "any", false, false, false, 76) . "-") . $this->env->getFunction('demi_findFirstRegionforLanguage')->getCallable()(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.', 76, $this->source); })()), "request", [], "any", false, false, false, 76), "locale", [], "any", false, false, false, 76)));
// line 77
if (((isset($context["local"]) || array_key_exists("local", $context) ? $context["local"] : (function () { throw new RuntimeError('Variable "local" does not exist.', 77, $this->source); })()) == "en-US")) {
// line 78
echo " ";
$context["local"] = "en-GB";
}
// line 80
echo "
";
// line 81
twig_get_attribute($this->env, $this->source, $this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig(), "add", [0 => ["local" => (isset($context["local"]) || array_key_exists("local", $context) ? $context["local"] : (function () { throw new RuntimeError('Variable "local" does not exist.', 81, $this->source); })())]], "method", false, false, false, 81);
// line 82
twig_get_attribute($this->env, $this->source, $this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig(), "add", [0 => ["useDataLayerTracking" => ((twig_in_filter("gtm", $this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getTrackingSystem", []))) ? (true) : (false))]], "method", false, false, false, 82);
// line 83
twig_get_attribute($this->env, $this->source, $this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig(), "add", [0 => ["ga4Tracking" => ((($this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getTrackingSystem", []) == "gtm-ga4")) ? (true) : (false))]], "method", false, false, false, 83);
// line 84
echo "
";
// line 98
echo "
";
// line 99
echo $this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig();
echo "
";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@ElementsDemiFrontend/Includes/layout/head.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 198 => 99, 195 => 98, 192 => 84, 190 => 83, 188 => 82, 186 => 81, 183 => 80, 179 => 78, 177 => 77, 175 => 76, 171 => 74, 169 => 73, 165 => 71, 162 => 57, 158 => 55, 155 => 53, 153 => 52, 150 => 51, 148 => 50, 143 => 48, 140 => 47, 136 => 45, 134 => 44, 127 => 39, 123 => 37, 121 => 36, 117 => 35, 113 => 33, 109 => 31, 105 => 29, 103 => 28, 89 => 16, 83 => 14, 80 => 13, 77 => 12, 74 => 11, 72 => 10, 69 => 9, 63 => 7, 61 => 6, 57 => 5, 53 => 4, 48 => 3, 46 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("<meta charset=\"UTF-8\">
{% if not editmode %}
{{ elements_head_title() }}
{{ elements_head_meta() }}
{{ elements_canonical() }}
{% if not deactivateHrefland|default(false) %}
{{ elements_hreflang() }}
{% endif %}
{% set img = demi_core_configuration('getOgImage',[]) %}
{% if img is not null %}
{% do elements_opengraph().addImage(app.request.getHost() ~ img.getThumbnail('ogimages')) %}
{% endif %}
{{ elements_opengraph() }}
{% endif %}
<!-- prevent underline numbers in edge -->
<meta name=\"format-detection\" content=\"telephone=no\"/>
<link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"/static/img/favicons/apple-touch-icon-152x152.png\">
<link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/static/img/favicons/apple-touch-icon-180x180.png\">
<link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/favicon-32x32.png\" sizes=\"32x32\">
<link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/android-chrome-192x192.png\" sizes=\"192x192\">
<link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/favicon-96x96.png\" sizes=\"96x96\">
<link rel=\"manifest\" href=\"/manifest.json\">
<link rel=\"mask-icon\" href=\"/static/img/favicons/safari-pinned-tab.svg\">
{% if pimcore_device().isTablet() %}
<meta name=\"viewport\" content=\"user-scalable=no\">
{% else %}
<meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0\">
{% endif %}
{{ include('@ElementsDemiFrontend/Includes/layout/headCss.html.twig') }}
{% if editmode %}
<link rel=\"stylesheet\" href=\"/static/css/editmode.css\">
{% endif %}
<script type=\"text/javascript\" data-cookieconsent=\"ignore\">
var supportsWoff2=function(){if(!(\"FontFace\"in window))return!1;var e=new window.FontFace(\"t\",'url( \"data:application/font-woff2,\" ) format( \"woff2\" )',{});return e.load()[\"catch\"](function(){})};!function(){\"use strict\";function e(){var e=navigator.userAgent.toLowerCase();return-1!=e.indexOf(\"msie\")&&8==parseInt(e.split(\"msie\")[1])?\"ie8\":supportsWoff2()?\"blink\":\"default\"}function t(e,t,n){e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent(\"on\"+t,n)}function n(e){if(window.XMLHttpRequest){var n=new XMLHttpRequest,i=e[1]+\"?dc=\"+e[0].split(\"--\")[0];n.open(\"GET\",i,!0),t(n,\"load\",function(){4===n.readyState&&a(n.responseText,e[0])}),n.send()}else{var o=document.createElement(\"link\");o.href=e[1],o.rel=\"stylesheet\",o.type=\"text/css\",document.getElementsByTagName(\"head\")[0].appendChild(o),document.cookie=e[0]}}function a(t,n){if(document.getElementById(n)&&\"ie8\"!=e())document.getElementById(n).innerHTML=t;else{var a=document.createElement(\"style\");a.innerHTML=t,document.getElementsByTagName(\"head\")[0].appendChild(a)}}var i=[];if(\"ie8\"!==e()){for(var o=document.getElementsByClassName(\"js-style\"),r=0;r<o.length;r++)o[r].getAttribute(\"data-font\")?i.push([o[r].getAttribute(\"id\"),o[r].getAttribute(\"data-href\")+e()+\".css\"]):i.push([o[r].getAttribute(\"id\"),o[r].getAttribute(\"data-href\")]);for(var s in i)if(\"ie8\"==e()){var d=document.createElement(\"link\");d.href=i[s][1],d.rel=\"stylesheet\",d.type=\"text/css\",document.getElementsByTagName(\"head\")[0].appendChild(d)}else t(window,\"load\",n(i[s]))}}();
</script>
{% if not editmode %}
<script id=\"Cookiebot\" src=\"https://consent.cookiebot.com/uc.js\" data-cbid=\"1ade52b6-e8d9-4dc2-92e0-3c43c1fd8cd4\" data-blockingmode=\"auto\" type=\"text/javascript\"></script>
{% endif %}
{{ include('@ElementsDemiFrontend/Includes/layout/js-config.html.twig') }}
{% set route = app.request.get('_route') %}
{% if not 'demi_checkout' in route %}
{# nothing here #}
{% else %}
{% do jsConfig('_initialState').add(demi_getSearchArray()) %}
{% endif %}
{#
TODO
\$tz = date_default_timezone_get();
\$timezoneHere = new DateTimeZone(\$tz);
\$timezoneUtc = new DateTimeZone(\"UTC\");
\$dateTimeUtc = new DateTime(\"now\", \$dateTimeUtc);
\$offset = \$timezoneHere->getOffset(\$dateTimeUtc);
\$this->jsConfig('_config')->add(['timezoneOffset'=>(int)\$offset])
#}
{% do jsConfig('_translations').add(demi_getAllDemiTranslationKeys()) %}
{% set local = app.request.locale ~ '-' ~ demi_findFirstRegionforLanguage(app.request.locale) %}
{% if local == \"en-US\" %}
{% set local = \"en-GB\" %}
{% endif %}
{% do jsConfig().add({'local': local}) %}
{% do jsConfig().add({'useDataLayerTracking': 'gtm' in demi_core_configuration('getTrackingSystem',[]) ? true : false}) %}
{% do jsConfig().add({'ga4Tracking': demi_core_configuration('getTrackingSystem',[]) == 'gtm-ga4' ? true : false}) %}
{# todo: delete the following block & add it to the dummy project #}
{#{% do jsConfig('_config').add('cookieServices', {#}
{# matomo: {#}
{# isAllowed: false,#}
{# isReadOnly: false,#}
{# text: \"Matomo\",#}
{# },#}
{# google: {#}
{# isAllowed: false,#}
{# isReadOnly: false,#}
{# text: \"Goolge\",#}
{# }#}
{#}) %}#}
{{ jsConfig() }}
", "@ElementsDemiFrontend/Includes/layout/head.html.twig", "/home/steiermark/www/src/Elements/Bundle/DemiFrontendBundle/Resources/views/Includes/layout/head.html.twig");
}
}