var/cache/dev/twig/af/af14de38e6df4090bba4a8cecba9c498.php line 35

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. /* includes/layout/header/page-header.html.twig */
  14. class __TwigTemplate_3f6afb55fd2db095e01a5c1524dc330b 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.         $this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
  26.         $this->checkSecurity();
  27.     }
  28.     protected function doDisplay(array $context, array $blocks = [])
  29.     {
  30.         $macros = $this->macros;
  31.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  32.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/layout/header/page-header.html.twig"));
  33.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  34.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/layout/header/page-header.html.twig"));
  35.         // line 1
  36.         echo "<header class=\"page-header page-header--";
  37.         echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 1, $this->source); })()), "getProperty", [0 => "header"], "method", false, false, true, 1), 1, $this->source), "html", null, true);
  38.         echo "\">
  39.     ";
  40.         // line 3
  41.         if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 3, $this->source); })())) {
  42.             // line 4
  43.             echo "
  44.         <div class=\"page-header--image-relation\">
  45.             <label>
  46.                 ";
  47.             // line 7
  48.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "headerSlider", ["types" => [0 => "asset"], "subtypes" => ["asset" => [0 => "video", 1 => "image"]], "width" => 600, "reload" => "true"]);
  49.             // line 14
  50.             echo "
  51.             </label>
  52.         </div>
  53.     ";
  54.         }
  55.         // line 19
  56.         echo "
  57.     <div class=\"page-header--image\">
  58.         ";
  59.         // line 21
  60.         if ( !twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "headerSlider"), "isEmpty", [], "method", false, false, true, 21)) {
  61.             // line 22
  62.             echo "            ";
  63.             if (((twig_length_filter($this->env, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "headerSlider")) == 1) || (isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 22, $this->source); })()))) {
  64.                 // line 23
  65.                 echo "                ";
  66.                 $context["headerobject"] = twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "headerSlider"), "getElements", [], "method", false, false, true, 23), 0, [], "array", false, false, true, 23);
  67.                 // line 24
  68.                 echo "                ";
  69.                 if ($this->env->getTest('instanceof')->getCallable()((isset($context["headerobject"]) || array_key_exists("headerobject", $context) ? $context["headerobject"] : (function () { throw new RuntimeError('Variable "headerobject" does not exist.', 24, $this->source); })()), "\\Pimcore\\Model\\Asset\\Image")) {
  70.                     // line 25
  71.                     echo "                    ";
  72.                     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.', 25, $this->source); })()), "getProperty", [0 => "portal"], "method", false, false, true, 25)) {
  73.                         // line 26
  74.                         echo "                        ";
  75.                         echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["headerobject"]) || array_key_exists("headerobject", $context) ? $context["headerobject"] : (function () { throw new RuntimeError('Variable "headerobject" does not exist.', 26, $this->source); })()), "getThumbnail", [0 => "headerImagePortal"], "method", false, false, true, 26), "getHTML", [], "method", false, false, true, 26), 26, $this->source);
  76.                         echo "
  77.                     ";
  78.                     } else {
  79.                         // line 28
  80.                         echo "                        ";
  81.                         echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, (isset($context["headerobject"]) || array_key_exists("headerobject", $context) ? $context["headerobject"] : (function () { throw new RuntimeError('Variable "headerobject" does not exist.', 28, $this->source); })()), "getThumbnail", [0 => "headerImage"], "method", false, false, true, 28), "getHTML", [], "method", false, false, true, 28), 28, $this->source);
  82.                         echo "
  83.                     ";
  84.                     }
  85.                     // line 30
  86.                     echo "                ";
  87.                 } else {
  88.                     // line 31
  89.                     echo "                    <video src=\"";
  90.                     echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["headerobject"]) || array_key_exists("headerobject", $context) ? $context["headerobject"] : (function () { throw new RuntimeError('Variable "headerobject" does not exist.', 31, $this->source); })()), 31, $this->source), "html", null, true);
  91.                     echo "\" ";
  92.                     if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 31, $this->source); })())) {
  93.                         echo "autoplay loop muted playsinline";
  94.                     }
  95.                     echo "></video>
  96.                 ";
  97.                 }
  98.                 // line 33
  99.                 echo "            ";
  100.             } else {
  101.                 // line 34
  102.                 echo "                <section class=\"slider-container\" aria-label=\"Gallery\">
  103.                     <ol class=\"conecto-slider\" data-sliderduration=\"";
  104.                 // line 35
  105.                 ((twig_test_empty(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.', 35, $this->source); })()), "getProperty", [0 => "slider-duration"], "method", false, false, true, 35))) ? (print (5)) : (print (twig_escape_filter($this->env, 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.', 35, $this->source); })()), "getProperty", [0 => "slider-duration"], "method", false, false, true, 35), "html", null, true))));
  106.                 echo "\">
  107.                         ";
  108.                 // line 36
  109.                 $context['_parent'] = $context;
  110.                 $context['_seq'] = twig_ensure_traversable($this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "headerSlider"));
  111.                 foreach ($context['_seq'] as $context["_key"] => $context["asset"]) {
  112.                     // line 37
  113.                     echo "                            <li class=\"slide\">
  114.                                 ";
  115.                     // line 38
  116.                     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.', 38, $this->source); })()), "getProperty", [0 => "portal"], "method", false, false, true, 38)) {
  117.                         // line 39
  118.                         echo "                                    ";
  119.                         echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["asset"], "getThumbnail", [0 => "headerImagePortal"], "method", false, false, true, 39), "getHTML", [0 => ["imgAttributes" => ["loading" => "eager"]]], "method", false, false, true, 39), 39, $this->source);
  120.                         echo "
  121.                                 ";
  122.                     } else {
  123.                         // line 41
  124.                         echo "                                    ";
  125.                         echo $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["asset"], "getThumbnail", [0 => "headerImage"], "method", false, false, true, 41), "getHTML", [0 => ["imgAttributes" => ["loading" => "eager"]]], "method", false, false, true, 41), 41, $this->source);
  126.                         echo "
  127.                                 ";
  128.                     }
  129.                     // line 43
  130.                     echo "                            </li>
  131.                         ";
  132.                 }
  133.                 $_parent = $context['_parent'];
  134.                 unset($context['_seq'], $context['_iterated'], $context['_key'], $context['asset'], $context['_parent'], $context['loop']);
  135.                 $context = array_intersect_key($context, $_parent) + $_parent;
  136.                 // line 45
  137.                 echo "                    </ol>
  138.                 </section>
  139.             ";
  140.             }
  141.             // line 48
  142.             echo "        ";
  143.         }
  144.         // line 49
  145.         echo "    </div>
  146.     ";
  147.         // line 51
  148.         if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 51, $this->source); })())) {
  149.             echo "<div class=\"page-header--boxed\">";
  150.         }
  151.         // line 52
  152.         echo "
  153.         ";
  154.         // line 53
  155.         if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 53, $this->source); })())) {
  156.             // line 54
  157.             echo "            <div class=\"page-header--logo\">
  158.                 ";
  159.             // line 55
  160.             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.', 55, $this->source); })()), "getProperty", [0 => "logo"], "method", false, false, true, 55)) {
  161.                 // line 56
  162.                 echo "                    <a href=\"/\" class=\"logo\">";
  163.                 echo twig_escape_filter($this->env, $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("page-title"), "html", null, true);
  164.                 echo "</a>
  165.                 ";
  166.             } else {
  167.                 // line 58
  168.                 echo "                    <a href=\"/";
  169.                 echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("mainnavStartNode"), "html", null, true);
  170.                 echo "\">
  171.                         <img src=\"";
  172.                 // line 59
  173.                 echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(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.', 59, $this->source); })()), "getProperty", [0 => "logo"], "method", false, false, true, 59), 59, $this->source), "html", null, true);
  174.                 echo "\" alt=\"logo\">
  175.                     </a>
  176.                 ";
  177.             }
  178.             // line 62
  179.             echo "            </div>
  180.             <div class=\"page-header--nav\">
  181.                 ";
  182.             // line 64
  183.             echo twig_include($this->env, $context, "includes/layout/header/mainnav/mainnav.html.twig");
  184.             echo "
  185.             </div>
  186.         ";
  187.         }
  188.         // line 67
  189.         echo "
  190.         ";
  191.         // line 68
  192.         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.', 68, $this->source); })()), "getProperty", [0 => "portal"], "method", false, false, true, 68)) {
  193.             // line 69
  194.             echo "            <div class=\"page-header--cta\">
  195.                 <h1>
  196.                     ";
  197.             // line 71
  198.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "wysiwyg", "wysiwyg", ["uiColor" => "#3fa69b", "toolbar" => [0 => ["name" => "basicstyles", "items" => [0 => "Bold", 1 => "Italic", 2 => "Underline"]], 1 => ["name" => "paragraph", "items" => [0 => "JustifyLeft", 1 => "JustifyCenter", 2 => "JustifyRight"]], 2 => "/", 3 => ["name" => "styles", "items" => [0 => "FontSize"]], 4 => ["name" => "colors", "items" => [0 => "TextColor", 1 => "BGColor"]], 5 => ["name" => "links", "items" => [0 => "Anchor"]]]]);
  199.             // line 81
  200.             echo "
  201.                 </h1>
  202.                 ";
  203.             // line 83
  204.             echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "link", "link", ["class" => "btn"]);
  205.             // line 85
  206.             echo "
  207.             </div>
  208.             <div class=\"page-header--widgets\">
  209.                 ";
  210.             // line 88
  211.             echo twig_include($this->env, $context, "includes/layout/header/widgets/page-header--widgets.html.twig");
  212.             echo "
  213.             </div>
  214.         ";
  215.         }
  216.         // line 91
  217.         echo "
  218.         ";
  219.         // line 92
  220.         if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 92, $this->source); })())) {
  221.             echo "</div>";
  222.         }
  223.         // line 93
  224.         echo "
  225.     ";
  226.         // line 94
  227.         if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 94, $this->source); })())) {
  228.             // line 95
  229.             echo "        <div class=\"page-header--meta\">
  230.             ";
  231.             // line 96
  232.             echo twig_include($this->env, $context, "includes/layout/header/metanav/page-header--metanav.html.twig");
  233.             echo "
  234.         </div>
  235.     ";
  236.         }
  237.         // line 99
  238.         echo "
  239. </header>";
  240.         
  241.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  242.         
  243.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  244.     }
  245.     public function getTemplateName()
  246.     {
  247.         return "includes/layout/header/page-header.html.twig";
  248.     }
  249.     public function isTraitable()
  250.     {
  251.         return false;
  252.     }
  253.     public function getDebugInfo()
  254.     {
  255.         return array (  250 => 99,  244 => 96,  241 => 95,  239 => 94,  236 => 93,  232 => 92,  229 => 91,  223 => 88,  218 => 85,  216 => 83,  212 => 81,  210 => 71,  206 => 69,  204 => 68,  201 => 67,  195 => 64,  191 => 62,  185 => 59,  180 => 58,  174 => 56,  172 => 55,  169 => 54,  167 => 53,  164 => 52,  160 => 51,  156 => 49,  153 => 48,  148 => 45,  141 => 43,  135 => 41,  129 => 39,  127 => 38,  124 => 37,  120 => 36,  116 => 35,  113 => 34,  110 => 33,  100 => 31,  97 => 30,  91 => 28,  85 => 26,  82 => 25,  79 => 24,  76 => 23,  73 => 22,  71 => 21,  67 => 19,  60 => 14,  58 => 7,  53 => 4,  51 => 3,  45 => 1,);
  256.     }
  257.     public function getSourceContext()
  258.     {
  259.         return new Source("<header class=\"page-header page-header--{{ document.getProperty('header') }}\">
  260.     {% if editmode %}
  261.         <div class=\"page-header--image-relation\">
  262.             <label>
  263.                 {{ pimcore_relations('headerSlider',{
  264.                     \"types\": [\"asset\"],
  265.                     \"subtypes\": {
  266.                         \"asset\": [\"video\", \"image\"]
  267.                     },
  268.                     \"width\": 600,
  269.                     \"reload\": \"true\"
  270.                 }) }}
  271.             </label>
  272.         </div>
  273.     {% endif %}
  274.     <div class=\"page-header--image\">
  275.         {% if not pimcore_relations('headerSlider').isEmpty() %}
  276.             {% if pimcore_relations('headerSlider') | length == 1 or editmode %}
  277.                 {% set headerobject = pimcore_relations('headerSlider').getElements()[0] %}
  278.                 {% if headerobject is instanceof('\\\\Pimcore\\\\Model\\\\Asset\\\\Image') %}
  279.                     {% if document.getProperty('portal') %}
  280.                         {{ headerobject.getThumbnail('headerImagePortal').getHTML()|raw }}
  281.                     {% else %}
  282.                         {{ headerobject.getThumbnail('headerImage').getHTML()|raw }}
  283.                     {% endif %}
  284.                 {% else %}
  285.                     <video src=\"{{ headerobject }}\" {% if not editmode %}autoplay loop muted playsinline{% endif %}></video>
  286.                 {% endif %}
  287.             {% else %}
  288.                 <section class=\"slider-container\" aria-label=\"Gallery\">
  289.                     <ol class=\"conecto-slider\" data-sliderduration=\"{{ document.getProperty('slider-duration') is empty ? 5 : document.getProperty('slider-duration') }}\">
  290.                         {% for asset in pimcore_relations('headerSlider') %}
  291.                             <li class=\"slide\">
  292.                                 {% if document.getProperty('portal') %}
  293.                                     {{ asset.getThumbnail('headerImagePortal').getHTML({'imgAttributes': { 'loading': 'eager' }})|raw }}
  294.                                 {% else %}
  295.                                     {{ asset.getThumbnail('headerImage').getHTML({'imgAttributes': { 'loading': 'eager' }})|raw }}
  296.                                 {% endif %}
  297.                             </li>
  298.                         {% endfor %}
  299.                     </ol>
  300.                 </section>
  301.             {% endif %}
  302.         {% endif %}
  303.     </div>
  304.     {% if not editmode %}<div class=\"page-header--boxed\">{% endif %}
  305.         {% if not editmode %}
  306.             <div class=\"page-header--logo\">
  307.                 {% if not document.getProperty('logo') %}
  308.                     <a href=\"/\" class=\"logo\">{{ pimcore_website_config('page-title') }}</a>
  309.                 {% else %}
  310.                     <a href=\"/{{ 'mainnavStartNode'|trans }}\">
  311.                         <img src=\"{{ document.getProperty('logo') }}\" alt=\"logo\">
  312.                     </a>
  313.                 {% endif %}
  314.             </div>
  315.             <div class=\"page-header--nav\">
  316.                 {{ include('includes/layout/header/mainnav/mainnav.html.twig') }}
  317.             </div>
  318.         {% endif %}
  319.         {% if document.getProperty('portal') %}
  320.             <div class=\"page-header--cta\">
  321.                 <h1>
  322.                     {{ pimcore_wysiwyg(\"wysiwyg\", {
  323.                         uiColor: '#3fa69b',
  324.                         toolbar: [
  325.                             { name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', ] },
  326.                             { name: 'paragraph', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight' ] },
  327.                             '/',
  328.                             { name: 'styles', items: [ 'FontSize' ] },
  329.                             { name: 'colors', items: [ 'TextColor', 'BGColor' ] },
  330.                             { name: 'links', items: [  'Anchor' ] },
  331.                         ]
  332.                     }) }}
  333.                 </h1>
  334.                 {{ pimcore_link('link', {
  335.                     \"class\": \"btn\"
  336.                 }) }}
  337.             </div>
  338.             <div class=\"page-header--widgets\">
  339.                 {{ include('includes/layout/header/widgets/page-header--widgets.html.twig') }}
  340.             </div>
  341.         {% endif %}
  342.         {% if not editmode %}</div>{% endif %}
  343.     {% if not editmode %}
  344.         <div class=\"page-header--meta\">
  345.             {{ include('includes/layout/header/metanav/page-header--metanav.html.twig') }}
  346.         </div>
  347.     {% endif %}
  348. </header>", "includes/layout/header/page-header.html.twig", "/html/pimcore/templates/includes/layout/header/page-header.html.twig");
  349.     }
  350.     
  351.     public function checkSecurity()
  352.     {
  353.         static $tags = array("if" => 3, "set" => 23, "for" => 36);
  354.         static $filters = array("escape" => 1, "length" => 22, "raw" => 26, "trans" => 58);
  355.         static $functions = array("pimcore_relations" => 7, "pimcore_website_config" => 56, "include" => 64, "pimcore_wysiwyg" => 71, "pimcore_link" => 83);
  356.         try {
  357.             $this->sandbox->checkSecurity(
  358.                 ['if', 'set', 'for'],
  359.                 ['escape', 'length', 'raw', 'trans'],
  360.                 ['pimcore_relations', 'pimcore_website_config', 'include', 'pimcore_wysiwyg', 'pimcore_link']
  361.             );
  362.         } catch (SecurityError $e) {
  363.             $e->setSourceContext($this->source);
  364.             if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
  365.                 $e->setTemplateLine($tags[$e->getTagName()]);
  366.             } elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
  367.                 $e->setTemplateLine($filters[$e->getFilterName()]);
  368.             } elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
  369.                 $e->setTemplateLine($functions[$e->getFunctionName()]);
  370.             }
  371.             throw $e;
  372.         }
  373.     }
  374. }