var/cache/dev/twig/03/03915ee36ceafb8119c28aea5ca13f30.php line 159

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. /* @ElementsDemiFrontend/Includes/layout/head.html.twig */
  14. class __TwigTemplate_82ffeb2bc140a2231efde16b6f8f932e 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""@ElementsDemiFrontend/Includes/layout/head.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""@ElementsDemiFrontend/Includes/layout/head.html.twig"));
  33.         // line 1
  34.         echo "<meta charset=\"UTF-8\">
  35. ";
  36.         // line 2
  37.         if ( !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'2$this->source); })())) {
  38.             // line 3
  39.             echo "    ";
  40.             echo $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsHeadTitle();
  41.             echo "
  42.     ";
  43.             // line 4
  44.             echo $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsHeadMeta();
  45.             echo "
  46.     ";
  47.             // line 5
  48.             echo $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsCanonical();
  49.             echo "
  50.     ";
  51.             // line 6
  52.             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))) {
  53.                 // line 7
  54.                 echo "        ";
  55.                 echo $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsHreflang();
  56.                 echo "
  57.     ";
  58.             }
  59.             // line 9
  60.             echo "
  61.     ";
  62.             // line 10
  63.             $context["img"] = $this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getOgImage", []);
  64.             // line 11
  65.             echo "    ";
  66.             if ( !(null === (isset($context["img"]) || array_key_exists("img"$context) ? $context["img"] : (function () { throw new RuntimeError('Variable "img" does not exist.'11$this->source); })()))) {
  67.                 // line 12
  68.                 echo "        ";
  69.                 twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsOpenGraph(), "addImage", [=> (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.'12$this->source); })()), "request", [], "any"falsefalsefalse12), "getHost", [], "method"falsefalsefalse12) . 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", [=> "ogimages"], "method"falsefalsefalse12))], "method"falsefalsefalse12);
  70.                 // line 13
  71.                 echo "    ";
  72.             }
  73.             // line 14
  74.             echo "    ";
  75.             echo $this->extensions['Elements\Bundle\SeoHelperBundle\Twig\SeoHelperExtension']->elementsOpenGraph();
  76.             echo "
  77. ";
  78.         }
  79.         // line 16
  80.         echo "
  81. <!-- prevent underline numbers in edge -->
  82. <meta name=\"format-detection\" content=\"telephone=no\"/>
  83. <link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"/static/img/favicons/apple-touch-icon-152x152.png\">
  84. <link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/static/img/favicons/apple-touch-icon-180x180.png\">
  85. <link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/favicon-32x32.png\" sizes=\"32x32\">
  86. <link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/android-chrome-192x192.png\" sizes=\"192x192\">
  87. <link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/favicon-96x96.png\" sizes=\"96x96\">
  88. <link rel=\"manifest\" href=\"/manifest.json\">
  89. <link rel=\"mask-icon\" href=\"/static/img/favicons/safari-pinned-tab.svg\">
  90. ";
  91.         // line 28
  92.         if (twig_get_attribute($this->env$this->sourcePimcore\Tool\DeviceDetector::getInstance(), "isTablet", [], "method"falsefalsefalse28)) {
  93.             // line 29
  94.             echo "    <meta name=\"viewport\" content=\"user-scalable=no\">
  95. ";
  96.         } else {
  97.             // line 31
  98.             echo "    <meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0\">
  99. ";
  100.         }
  101.         // line 33
  102.         echo "
  103. ";
  104.         // line 35
  105.         echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/layout/headCss.html.twig");
  106.         echo "
  107. ";
  108.         // line 36
  109.         if ((isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'36$this->source); })())) {
  110.             // line 37
  111.             echo "    <link rel=\"stylesheet\" href=\"/static/css/editmode.css\">
  112. ";
  113.         }
  114.         // line 39
  115.         echo "
  116. <script type=\"text/javascript\" data-cookieconsent=\"ignore\">
  117.     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]))}}();
  118. </script>
  119. ";
  120.         // line 44
  121.         if ( !(isset($context["editmode"]) || array_key_exists("editmode"$context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.'44$this->source); })())) {
  122.             // line 45
  123.             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>
  124. ";
  125.         }
  126.         // line 47
  127.         echo "
  128. ";
  129.         // line 48
  130.         echo twig_include($this->env$context"@ElementsDemiFrontend/Includes/layout/js-config.html.twig");
  131.         echo "
  132. ";
  133.         // line 50
  134.         $context["route"] = 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.'50$this->source); })()), "request", [], "any"falsefalsefalse50), "get", [=> "_route"], "method"falsefalsefalse50);
  135.         // line 51
  136.         echo "
  137. ";
  138.         // line 52
  139.         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); })()))) {
  140.             // line 53
  141.             echo "    ";
  142.         } else {
  143.             // line 55
  144.             echo "    ";
  145.             twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig("_initialState"), "add", [=> $this->env->getFunction('demi_getSearchArray')->getCallable()()], "method"falsefalsefalse55);
  146.         }
  147.         // line 57
  148.         echo "
  149. ";
  150.         // line 71
  151.         echo "
  152. ";
  153.         // line 73
  154.         twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig("_translations"), "add", [=> $this->env->getFunction('demi_getAllDemiTranslationKeys')->getCallable()()], "method"falsefalsefalse73);
  155.         // line 74
  156.         echo "
  157. ";
  158.         // line 76
  159.         $context["local"] = ((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.'76$this->source); })()), "request", [], "any"falsefalsefalse76), "locale", [], "any"falsefalsefalse76) . "-") . $this->env->getFunction('demi_findFirstRegionforLanguage')->getCallable()(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.'76$this->source); })()), "request", [], "any"falsefalsefalse76), "locale", [], "any"falsefalsefalse76)));
  160.         // line 77
  161.         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")) {
  162.             // line 78
  163.             echo "    ";
  164.             $context["local"] = "en-GB";
  165.         }
  166.         // line 80
  167.         echo "
  168. ";
  169.         // line 81
  170.         twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig(), "add", [=> ["local" => (isset($context["local"]) || array_key_exists("local"$context) ? $context["local"] : (function () { throw new RuntimeError('Variable "local" does not exist.'81$this->source); })())]], "method"falsefalsefalse81);
  171.         // line 82
  172.         twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig(), "add", [=> ["useDataLayerTracking" => ((twig_in_filter("gtm"$this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getTrackingSystem", []))) ? (true) : (false))]], "method"falsefalsefalse82);
  173.         // line 83
  174.         twig_get_attribute($this->env$this->source$this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig(), "add", [=> ["ga4Tracking" => ((($this->extensions['Elements\Demi\Frontend\Twig\DemiConfigurationExtension']->getConfig("getTrackingSystem", []) == "gtm-ga4")) ? (true) : (false))]], "method"falsefalsefalse83);
  175.         // line 84
  176.         echo "
  177. ";
  178.         // line 98
  179.         echo "
  180. ";
  181.         // line 99
  182.         echo $this->extensions['Elements\Bundle\JsConfigBundle\Twig\Extension\JsConfigExtension']->jsConfig();
  183.         echo "
  184. ";
  185.         
  186.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  187.         
  188.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  189.     }
  190.     public function getTemplateName()
  191.     {
  192.         return "@ElementsDemiFrontend/Includes/layout/head.html.twig";
  193.     }
  194.     public function isTraitable()
  195.     {
  196.         return false;
  197.     }
  198.     public function getDebugInfo()
  199.     {
  200.         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,);
  201.     }
  202.     public function getSourceContext()
  203.     {
  204.         return new Source("<meta charset=\"UTF-8\">
  205. {% if not editmode %}
  206.     {{ elements_head_title() }}
  207.     {{ elements_head_meta() }}
  208.     {{ elements_canonical() }}
  209.     {% if not deactivateHrefland|default(false) %}
  210.         {{ elements_hreflang() }}
  211.     {% endif %}
  212.     {% set img = demi_core_configuration('getOgImage',[]) %}
  213.     {% if img is not null %}
  214.         {% do elements_opengraph().addImage(app.request.getHost() ~ img.getThumbnail('ogimages')) %}
  215.     {% endif %}
  216.     {{ elements_opengraph() }}
  217. {% endif %}
  218. <!-- prevent underline numbers in edge -->
  219. <meta name=\"format-detection\" content=\"telephone=no\"/>
  220. <link rel=\"apple-touch-icon\" sizes=\"152x152\" href=\"/static/img/favicons/apple-touch-icon-152x152.png\">
  221. <link rel=\"apple-touch-icon\" sizes=\"180x180\" href=\"/static/img/favicons/apple-touch-icon-180x180.png\">
  222. <link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/favicon-32x32.png\" sizes=\"32x32\">
  223. <link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/android-chrome-192x192.png\" sizes=\"192x192\">
  224. <link rel=\"icon\" type=\"image/png\" href=\"/static/img/favicons/favicon-96x96.png\" sizes=\"96x96\">
  225. <link rel=\"manifest\" href=\"/manifest.json\">
  226. <link rel=\"mask-icon\" href=\"/static/img/favicons/safari-pinned-tab.svg\">
  227. {% if pimcore_device().isTablet() %}
  228.     <meta name=\"viewport\" content=\"user-scalable=no\">
  229. {% else %}
  230.     <meta name=\"viewport\" content=\"width=device-width, user-scalable=no, initial-scale=1.0\">
  231. {% endif %}
  232. {{ include('@ElementsDemiFrontend/Includes/layout/headCss.html.twig') }}
  233. {% if editmode %}
  234.     <link rel=\"stylesheet\" href=\"/static/css/editmode.css\">
  235. {% endif %}
  236. <script type=\"text/javascript\" data-cookieconsent=\"ignore\">
  237.     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]))}}();
  238. </script>
  239. {% if not editmode %}
  240.     <script id=\"Cookiebot\" src=\"https://consent.cookiebot.com/uc.js\" data-cbid=\"1ade52b6-e8d9-4dc2-92e0-3c43c1fd8cd4\" data-blockingmode=\"auto\" type=\"text/javascript\"></script>
  241. {% endif %}
  242. {{ include('@ElementsDemiFrontend/Includes/layout/js-config.html.twig') }}
  243. {%  set route = app.request.get('_route') %}
  244. {% if not 'demi_checkout' in route %}
  245.     {# nothing here #}
  246. {% else  %}
  247.     {% do jsConfig('_initialState').add(demi_getSearchArray()) %}
  248. {% endif %}
  249. {#
  250. TODO
  251. \$tz = date_default_timezone_get();
  252. \$timezoneHere = new DateTimeZone(\$tz);
  253. \$timezoneUtc = new DateTimeZone(\"UTC\");
  254. \$dateTimeUtc = new DateTime(\"now\", \$dateTimeUtc);
  255. \$offset = \$timezoneHere->getOffset(\$dateTimeUtc);
  256. \$this->jsConfig('_config')->add(['timezoneOffset'=>(int)\$offset])
  257. #}
  258. {% do jsConfig('_translations').add(demi_getAllDemiTranslationKeys()) %}
  259. {% set local = app.request.locale ~ '-' ~ demi_findFirstRegionforLanguage(app.request.locale) %}
  260. {%  if local == \"en-US\" %}
  261.     {% set local = \"en-GB\" %}
  262. {% endif %}
  263. {% do jsConfig().add({'local': local}) %}
  264. {% do jsConfig().add({'useDataLayerTracking': 'gtm' in demi_core_configuration('getTrackingSystem',[])  ? true : false}) %}
  265. {% do jsConfig().add({'ga4Tracking': demi_core_configuration('getTrackingSystem',[]) == 'gtm-ga4'  ? true : false}) %}
  266. {# todo: delete the following block & add it to the dummy project #}
  267. {#{% do jsConfig('_config').add('cookieServices', {#}
  268. {#    matomo: {#}
  269. {#        isAllowed: false,#}
  270. {#        isReadOnly: false,#}
  271. {#        text: \"Matomo\",#}
  272. {#    },#}
  273. {#    google: {#}
  274. {#        isAllowed: false,#}
  275. {#        isReadOnly: false,#}
  276. {#        text: \"Goolge\",#}
  277. {#    }#}
  278. {#}) %}#}
  279. {{ jsConfig() }}
  280. ""@ElementsDemiFrontend/Includes/layout/head.html.twig""/home/steiermark/www/src/Elements/Bundle/DemiFrontendBundle/Resources/views/Includes/layout/head.html.twig");
  281.     }
  282. }