<?php
use Twig\Environment;
use Twig\Error\LoaderError;
use Twig\Error\RuntimeError;
use Twig\Extension\CoreExtension;
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;
use Twig\TemplateWrapper;
/* areas/header/view.html.twig */
class __TwigTemplate_730079d82e86902680d044764763e99f extends Template
{
private Source $source;
/**
* @var array<string, Template>
*/
private array $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
$this->sandbox = $this->extensions[SandboxExtension::class];
$this->checkSecurity();
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$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", "areas/header/view.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "areas/header/view.html.twig"));
// line 3
$context["headlineTag"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "headline", ["store" => [["none", "none"], ["h1", "H1"], ["h2", "H2"], ["h3", "H3"], ["h4", "H4"], ["h5", "H5"], ["h6", "H6"]], "defaultValue" => "", "reload" => true]);
// line 16
yield "
";
// line 17
if (CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 17, $this->source); })()), "isEmpty", [], "method", false, false, true, 17)) {
// line 18
yield " ";
CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 18, $this->source); })()), "setDataFromResource", ["none"], "method", false, false, true, 18);
}
// line 20
yield "
";
// line 21
$context["headline1"] = (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 21, $this->source); })()), "data", [], "any", false, false, true, 21) != "none")) ? ($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 21, $this->source); })()), "data", [], "any", false, false, true, 21), 21, $this->source)) : ("span"));
// line 22
$context["headline2"] = (((CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 22, $this->source); })()), "data", [], "any", false, false, true, 22) != "none")) ? ((("</" . $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, (isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 22, $this->source); })()), "data", [], "any", false, false, true, 22), 22, $this->source)) . ">")) : ("</span>"));
// line 23
yield "
<section class=\"header ";
// line 24
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "MarginBottom"), "getData", [], "method", false, false, true, 24), 24, $this->source), "html", null, true);
yield "\">
";
// line 25
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 25, $this->source); })())) {
// line 26
yield " <div class=\"editmode-container\" style=\"display: flex; flex-direction: column; justify-content: center; width: 100%;\">
<div class=\"content flex column center gap-20\">
<div class=\"content-box flex gap-20\">
<div class=\"item\">
<p class=\"edit-p\">Abstand nach unten wählen:</p>
";
// line 32
yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "MarginBottom", ["reload" => true, "store" => [["regular", "Normal"], ["half", "1/2"], ["small", "1/4"], ["zero", "kein Abstand"]], "defaultValue" => "regular"]);
// line 41
yield "
</div>
<div class=\"item\">
<div class=\"setting select\">
<p class=\"edit-p\">Titel-Typ definieren:</p>
";
// line 47
yield $this->sandbox->ensureToStringAllowed((isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 47, $this->source); })()), 47, $this->source);
yield "
</div>
</div>
</div>
<div class=\"relation-container\">
";
// line 53
yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "SwipeSlider", ["title" => "SwipeSlider Objekte ablegen", "types" => ["object"], "subtypes" => ["object" => ["object"]], "classes" => ["SwipeSlider"]]);
// line 60
yield "
</div>
</div>
</div>
";
} else {
// line 66
yield " <div class=\"swiper header-swiper\">
<div class=\"swiper-wrapper\">
";
// line 68
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable($this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "SwipeSlider"));
$context['loop'] = [
'parent' => $context['_parent'],
'index0' => 0,
'index' => 1,
'first' => true,
];
if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
$length = count($context['_seq']);
$context['loop']['revindex0'] = $length - 1;
$context['loop']['revindex'] = $length;
$context['loop']['length'] = $length;
$context['loop']['last'] = 1 === $length;
}
foreach ($context['_seq'] as $context["_key"] => $context["slider"]) {
// line 69
yield " <div class=\"swiper-slide flex column\">
";
// line 70
if (CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "image", [], "any", false, false, true, 70)) {
// line 71
yield " ";
// line 72
yield " ";
// line 73
yield " ";
// line 80
yield " ";
yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "image", [], "any", false, false, true, 80), "thumbnail", ["SwipeSlider"], "method", false, false, true, 80), "html", [["imgAttributes" => ["class" => "desktop", "loading" => "eager"]]], "method", false, false, true, 80), 80, $this->source);
// line 83
yield "
";
}
// line 85
yield "
<div class=\"hero-hexagon hexagon as-hex\">
";
// line 87
yield Twig\Extension\CoreExtension::include($this->env, $context, "svg/hexagon.html.twig");
yield "
</div>
<div class=\"headlines\">
";
// 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); })())) {
// line 93
yield " <div class=\"hero-lead\">
";
// line 94
yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "headline", [], "any", false, false, true, 94), 94, $this->source);
yield "
</div>
";
} elseif (CoreExtension::getAttribute($this->env, $this->source, // line 96
$context["slider"], "headline", [], "any", false, false, true, 96)) {
// line 97
yield " <";
yield $this->sandbox->ensureToStringAllowed((isset($context["headline1"]) || array_key_exists("headline1", $context) ? $context["headline1"] : (function () { throw new RuntimeError('Variable "headline1" does not exist.', 97, $this->source); })()), 97, $this->source);
yield " class=\"hero-lead\">
";
// line 98
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(Twig\Extension\CoreExtension::striptags($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "headline", [], "any", false, false, true, 98), 98, $this->source)), "html", null, true);
yield "
";
// line 99
yield $this->sandbox->ensureToStringAllowed((isset($context["headline2"]) || array_key_exists("headline2", $context) ? $context["headline2"] : (function () { throw new RuntimeError('Variable "headline2" does not exist.', 99, $this->source); })()), 99, $this->source);
yield "
";
}
// line 101
yield "
";
// line 103
if (CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "text", [], "any", false, false, true, 103)) {
// line 104
yield " <div class=\"hero-text\">
";
// line 105
yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["slider"], "text", [], "any", false, false, true, 105), 105, $this->source);
yield "
</div>
";
}
// line 108
yield "
</div>
</div>
";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['revindex0'], $context['loop']['revindex'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_key'], $context['slider'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 113
yield " </div>
<div class=\"swiper-pagination\"></div>
</div>
";
}
// line 117
yield "</section>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "areas/header/view.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 230 => 117, 224 => 113, 206 => 108, 200 => 105, 197 => 104, 195 => 103, 191 => 101, 186 => 99, 182 => 98, 177 => 97, 175 => 96, 170 => 94, 167 => 93, 165 => 92, 157 => 87, 153 => 85, 149 => 83, 146 => 80, 144 => 73, 142 => 72, 140 => 71, 138 => 70, 135 => 69, 118 => 68, 114 => 66, 106 => 60, 104 => 53, 95 => 47, 87 => 41, 85 => 32, 77 => 26, 75 => 25, 71 => 24, 68 => 23, 66 => 22, 64 => 21, 61 => 20, 57 => 18, 55 => 17, 52 => 16, 50 => 3,);
}
public function getSourceContext(): Source
{
return new Source("{# default headline #}
{# headline #}
{% set headlineTag = pimcore_select('headline', {
'store': [
['none', 'none'],
['h1', 'H1'],
['h2', 'H2'],
['h3', 'H3'],
['h4', 'H4'],
['h5', 'H5'],
['h6', 'H6'],
],
'defaultValue': '',
'reload': true
}) %}
{% if headlineTag.isEmpty() %}
{% do headlineTag.setDataFromResource('none') %}
{% endif %}
{% set headline1 = headlineTag.data != 'none' ? headlineTag.data|raw : 'span'|raw %}
{% set headline2 = headlineTag.data != 'none' ? '</' ~ headlineTag.data|raw ~ '>' : '</span>'|raw %}
<section class=\"header {{ pimcore_select('MarginBottom').getData() }}\">
{% if editmode %}
<div class=\"editmode-container\" style=\"display: flex; flex-direction: column; justify-content: center; width: 100%;\">
<div class=\"content flex column center gap-20\">
<div class=\"content-box flex gap-20\">
<div class=\"item\">
<p class=\"edit-p\">Abstand nach unten wählen:</p>
{{ pimcore_select(\"MarginBottom\", {
\"reload\": true,
\"store\": [
[\"regular\", \"Normal\"],
[\"half\", \"1/2\"],
[\"small\", \"1/4\"],
[\"zero\", \"kein Abstand\"],
],
\"defaultValue\" : \"regular\"
}) }}
</div>
<div class=\"item\">
<div class=\"setting select\">
<p class=\"edit-p\">Titel-Typ definieren:</p>
{{ headlineTag|raw }}
</div>
</div>
</div>
<div class=\"relation-container\">
{{ pimcore_relations(\"SwipeSlider\", {
\"title\": \"SwipeSlider Objekte ablegen\",
\"types\": [\"object\"],
\"subtypes\": {
\"object\": [\"object\"]
},
\"classes\": [\"SwipeSlider\"]
}) }}
</div>
</div>
</div>
{% else %}
<div class=\"swiper header-swiper\">
<div class=\"swiper-wrapper\">
{% for slider in pimcore_relations(\"SwipeSlider\") %}
<div class=\"swiper-slide flex column\">
{% if slider.image %}
{#<img class=\"desktop\" src=\"{{ slider.image.thumbnail('SwipeSlider') }}\" alt=\"\">#}
{#<img class=\"mobile\" src=\"{{ slider.mobileImage.thumbnail('SwipeSliderMobile') }}\" alt=\"\">#}
{# {% if deviceType == \"phone\" %}
{{ slider.mobileImage.thumbnail('SwipeSliderMobile').html({imgAttributes: {
\"class\": \"mobile\",
'loading': 'eager',
}}) | raw }}
{% else %}
{% endif %} #}
{{ slider.image.thumbnail('SwipeSlider').html({imgAttributes: {
\"class\": \"desktop\",
'loading': 'eager',
}}) | raw }}
{% endif %}
<div class=\"hero-hexagon hexagon as-hex\">
{{ include('svg/hexagon.html.twig') }}
</div>
<div class=\"headlines\">
{% if editmode %}
<div class=\"hero-lead\">
{{ slider.headline|raw }}
</div>
{% elseif slider.headline %}
<{{headline1|raw}} class=\"hero-lead\">
{{ slider.headline | striptags }}
{{ headline2|raw }}
{% endif %}
{% if slider.text %}
<div class=\"hero-text\">
{{ slider.text | raw }}
</div>
{% endif %}
</div>
</div>
{% endfor %}
</div>
<div class=\"swiper-pagination\"></div>
</div>
{% endif %}
</section>", "areas/header/view.html.twig", "/home/httpd/vhosts/annavation.a4interactive.ch/httpdocs/dev/templates/areas/header/view.html.twig");
}
public function checkSecurity()
{
static $tags = ["set" => 3, "if" => 17, "do" => 18, "for" => 68];
static $filters = ["raw" => 21, "escape" => 24, "striptags" => 98];
static $functions = ["pimcore_select" => 3, "pimcore_relations" => 53, "include" => 87];
try {
$this->sandbox->checkSecurity(
['set', 'if', 'do', 'for'],
['raw', 'escape', 'striptags'],
['pimcore_select', 'pimcore_relations', 'include'],
$this->source
);
} 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;
}
}
}