<?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;
/* includes/layout/header/page-header.html.twig */
class __TwigTemplate_3f6afb55fd2db095e01a5c1524dc330b extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->env->getExtension('\Twig\Extension\SandboxExtension');
$this->checkSecurity();
}
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", "includes/layout/header/page-header.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "includes/layout/header/page-header.html.twig"));
// line 1
echo "<header class=\"page-header page-header--";
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);
echo "\">
";
// line 3
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 3, $this->source); })())) {
// line 4
echo "
<div class=\"page-header--image-relation\">
<label>
";
// line 7
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "headerSlider", ["types" => [0 => "asset"], "subtypes" => ["asset" => [0 => "video", 1 => "image"]], "width" => 600, "reload" => "true"]);
// line 14
echo "
</label>
</div>
";
}
// line 19
echo "
<div class=\"page-header--image\">
";
// line 21
if ( !twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "headerSlider"), "isEmpty", [], "method", false, false, true, 21)) {
// line 22
echo " ";
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); })()))) {
// line 23
echo " ";
$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);
// line 24
echo " ";
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")) {
// line 25
echo " ";
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)) {
// line 26
echo " ";
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);
echo "
";
} else {
// line 28
echo " ";
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);
echo "
";
}
// line 30
echo " ";
} else {
// line 31
echo " <video src=\"";
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);
echo "\" ";
if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 31, $this->source); })())) {
echo "autoplay loop muted playsinline";
}
echo "></video>
";
}
// line 33
echo " ";
} else {
// line 34
echo " <section class=\"slider-container\" aria-label=\"Gallery\">
<ol class=\"conecto-slider\" data-sliderduration=\"";
// line 35
((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))));
echo "\">
";
// line 36
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable($this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "headerSlider"));
foreach ($context['_seq'] as $context["_key"] => $context["asset"]) {
// line 37
echo " <li class=\"slide\">
";
// line 38
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)) {
// line 39
echo " ";
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);
echo "
";
} else {
// line 41
echo " ";
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);
echo "
";
}
// line 43
echo " </li>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['asset'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 45
echo " </ol>
</section>
";
}
// line 48
echo " ";
}
// line 49
echo " </div>
";
// line 51
if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 51, $this->source); })())) {
echo "<div class=\"page-header--boxed\">";
}
// line 52
echo "
";
// line 53
if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 53, $this->source); })())) {
// line 54
echo " <div class=\"page-header--logo\">
";
// line 55
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)) {
// line 56
echo " <a href=\"/\" class=\"logo\">";
echo twig_escape_filter($this->env, $this->extensions['Pimcore\Twig\Extension\WebsiteConfigExtension']->getWebsiteConfig("page-title"), "html", null, true);
echo "</a>
";
} else {
// line 58
echo " <a href=\"/";
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans("mainnavStartNode"), "html", null, true);
echo "\">
<img src=\"";
// line 59
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);
echo "\" alt=\"logo\">
</a>
";
}
// line 62
echo " </div>
<div class=\"page-header--nav\">
";
// line 64
echo twig_include($this->env, $context, "includes/layout/header/mainnav/mainnav.html.twig");
echo "
</div>
";
}
// line 67
echo "
";
// line 68
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)) {
// line 69
echo " <div class=\"page-header--cta\">
<h1>
";
// line 71
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"]]]]);
// line 81
echo "
</h1>
";
// line 83
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "link", "link", ["class" => "btn"]);
// line 85
echo "
</div>
<div class=\"page-header--widgets\">
";
// line 88
echo twig_include($this->env, $context, "includes/layout/header/widgets/page-header--widgets.html.twig");
echo "
</div>
";
}
// line 91
echo "
";
// line 92
if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 92, $this->source); })())) {
echo "</div>";
}
// line 93
echo "
";
// line 94
if ( !(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 94, $this->source); })())) {
// line 95
echo " <div class=\"page-header--meta\">
";
// line 96
echo twig_include($this->env, $context, "includes/layout/header/metanav/page-header--metanav.html.twig");
echo "
</div>
";
}
// line 99
echo "
</header>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "includes/layout/header/page-header.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
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,);
}
public function getSourceContext()
{
return new Source("<header class=\"page-header page-header--{{ document.getProperty('header') }}\">
{% if editmode %}
<div class=\"page-header--image-relation\">
<label>
{{ pimcore_relations('headerSlider',{
\"types\": [\"asset\"],
\"subtypes\": {
\"asset\": [\"video\", \"image\"]
},
\"width\": 600,
\"reload\": \"true\"
}) }}
</label>
</div>
{% endif %}
<div class=\"page-header--image\">
{% if not pimcore_relations('headerSlider').isEmpty() %}
{% if pimcore_relations('headerSlider') | length == 1 or editmode %}
{% set headerobject = pimcore_relations('headerSlider').getElements()[0] %}
{% if headerobject is instanceof('\\\\Pimcore\\\\Model\\\\Asset\\\\Image') %}
{% if document.getProperty('portal') %}
{{ headerobject.getThumbnail('headerImagePortal').getHTML()|raw }}
{% else %}
{{ headerobject.getThumbnail('headerImage').getHTML()|raw }}
{% endif %}
{% else %}
<video src=\"{{ headerobject }}\" {% if not editmode %}autoplay loop muted playsinline{% endif %}></video>
{% endif %}
{% else %}
<section class=\"slider-container\" aria-label=\"Gallery\">
<ol class=\"conecto-slider\" data-sliderduration=\"{{ document.getProperty('slider-duration') is empty ? 5 : document.getProperty('slider-duration') }}\">
{% for asset in pimcore_relations('headerSlider') %}
<li class=\"slide\">
{% if document.getProperty('portal') %}
{{ asset.getThumbnail('headerImagePortal').getHTML({'imgAttributes': { 'loading': 'eager' }})|raw }}
{% else %}
{{ asset.getThumbnail('headerImage').getHTML({'imgAttributes': { 'loading': 'eager' }})|raw }}
{% endif %}
</li>
{% endfor %}
</ol>
</section>
{% endif %}
{% endif %}
</div>
{% if not editmode %}<div class=\"page-header--boxed\">{% endif %}
{% if not editmode %}
<div class=\"page-header--logo\">
{% if not document.getProperty('logo') %}
<a href=\"/\" class=\"logo\">{{ pimcore_website_config('page-title') }}</a>
{% else %}
<a href=\"/{{ 'mainnavStartNode'|trans }}\">
<img src=\"{{ document.getProperty('logo') }}\" alt=\"logo\">
</a>
{% endif %}
</div>
<div class=\"page-header--nav\">
{{ include('includes/layout/header/mainnav/mainnav.html.twig') }}
</div>
{% endif %}
{% if document.getProperty('portal') %}
<div class=\"page-header--cta\">
<h1>
{{ pimcore_wysiwyg(\"wysiwyg\", {
uiColor: '#3fa69b',
toolbar: [
{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', ] },
{ name: 'paragraph', items: [ 'JustifyLeft', 'JustifyCenter', 'JustifyRight' ] },
'/',
{ name: 'styles', items: [ 'FontSize' ] },
{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
{ name: 'links', items: [ 'Anchor' ] },
]
}) }}
</h1>
{{ pimcore_link('link', {
\"class\": \"btn\"
}) }}
</div>
<div class=\"page-header--widgets\">
{{ include('includes/layout/header/widgets/page-header--widgets.html.twig') }}
</div>
{% endif %}
{% if not editmode %}</div>{% endif %}
{% if not editmode %}
<div class=\"page-header--meta\">
{{ include('includes/layout/header/metanav/page-header--metanav.html.twig') }}
</div>
{% endif %}
</header>", "includes/layout/header/page-header.html.twig", "/html/pimcore/templates/includes/layout/header/page-header.html.twig");
}
public function checkSecurity()
{
static $tags = array("if" => 3, "set" => 23, "for" => 36);
static $filters = array("escape" => 1, "length" => 22, "raw" => 26, "trans" => 58);
static $functions = array("pimcore_relations" => 7, "pimcore_website_config" => 56, "include" => 64, "pimcore_wysiwyg" => 71, "pimcore_link" => 83);
try {
$this->sandbox->checkSecurity(
['if', 'set', 'for'],
['escape', 'length', 'raw', 'trans'],
['pimcore_relations', 'pimcore_website_config', 'include', 'pimcore_wysiwyg', 'pimcore_link']
);
} catch (SecurityError $e) {
$e->setSourceContext($this->source);
if ($e instanceof SecurityNotAllowedTagError && isset($tags[$e->getTagName()])) {
$e->setTemplateLine($tags[$e->getTagName()]);
} elseif ($e instanceof SecurityNotAllowedFilterError && isset($filters[$e->getFilterName()])) {
$e->setTemplateLine($filters[$e->getFilterName()]);
} elseif ($e instanceof SecurityNotAllowedFunctionError && isset($functions[$e->getFunctionName()])) {
$e->setTemplateLine($functions[$e->getFunctionName()]);
}
throw $e;
}
}
}