<?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/cards/view.html.twig */
class __TwigTemplate_b8e731084cf567a55c2f47fba2de7f44 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/cards/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/cards/view.html.twig"));
// line 1
$context["headlineTag"] = $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "select", "headline1", ["store" => [["none", "none"], ["h1", "H1"], ["h2", "H2"], ["h3", "H3"], ["h4", "H4"], ["h5", "H5"], ["h6", "H6"]], "defaultValue" => "", "reload" => true]);
// line 14
yield "
";
// line 15
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.', 15, $this->source); })()), "isEmpty", [], "method", false, false, true, 15)) {
// line 16
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.', 16, $this->source); })()), "setDataFromResource", ["h2"], "method", false, false, true, 16);
}
// line 18
yield "
";
// line 19
$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.', 19, $this->source); })()), "data", [], "any", false, false, true, 19) != "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.', 19, $this->source); })()), "data", [], "any", false, false, true, 19), 19, $this->source)) : ("span"));
// line 20
$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.', 20, $this->source); })()), "data", [], "any", false, false, true, 20) != "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.', 20, $this->source); })()), "data", [], "any", false, false, true, 20), 20, $this->source)) . ">")) : ("</span>"));
// line 21
yield "
";
// line 23
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 23, $this->source); })())) {
// line 24
yield " <div class=\"edit-box\">
<h1>KONFIGURATIONEN FÜR DEN AREABRICK:</h1>
<div class=\"flex gap-20\">
<div class=\"content flex column gap-20\">
<div class=\"content-box flex gap-20\">
<div class=\"item\">
<p class=\"edit-p\">Abstand nach unten wählen:</p>
";
// line 31
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 40
yield "
</div>
<div class=\"item\">
<p class=\"edit-p\">Titel-Typ definieren:</p>
";
// line 45
yield $this->sandbox->ensureToStringAllowed((isset($context["headlineTag"]) || array_key_exists("headlineTag", $context) ? $context["headlineTag"] : (function () { throw new RuntimeError('Variable "headlineTag" does not exist.', 45, $this->source); })()), 45, $this->source);
yield "
</div>
</div>
</div>
</div>
</div>
";
}
// line 52
yield "<section class=\"cards mulden-teaser ";
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, 52), 52, $this->source), "html", null, true);
yield "\">
<div class=\"container\">
<div class=\"content-container\">
";
// line 56
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 56, $this->source); })())) {
// line 57
yield " <span class=\"mulden-title\">";
yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", "headline", ["nl2br" => true, "height" => 200, "placeholder" => "HAUPT ÜBERSCHRIFT FÜR DIESE AREA"]);
// line 61
yield "
</span>
";
} elseif (( ! // line 63
(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 63, $this->source); })()) && !CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", "headline"), "isEmpty", [], "method", false, false, true, 63))) {
// line 64
yield " <";
yield $this->sandbox->ensureToStringAllowed((isset($context["headline1"]) || array_key_exists("headline1", $context) ? $context["headline1"] : (function () { throw new RuntimeError('Variable "headline1" does not exist.', 64, $this->source); })()), 64, $this->source);
yield " class=\"mulden-title\">
";
// line 65
yield Twig\Extension\CoreExtension::nl2br($this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", "headline"), "getData", [], "method", false, false, true, 65), 65, $this->source), "html", null, true));
yield "
";
// line 66
yield $this->sandbox->ensureToStringAllowed((isset($context["headline2"]) || array_key_exists("headline2", $context) ? $context["headline2"] : (function () { throw new RuntimeError('Variable "headline2" does not exist.', 66, $this->source); })()), 66, $this->source);
yield "
";
}
// line 68
yield "
";
// line 69
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 69, $this->source); })())) {
// line 70
yield " ";
yield $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "Teaser", ["title" => "Cards Objekte ablegen", "types" => ["object"], "subtypes" => ["object" => ["object"]], "classes" => ["Card"]]);
// line 77
yield "
";
} elseif (( ! // line 78
(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 78, $this->source); })()) && !CoreExtension::getAttribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "Teaser"), "isEmpty", [], "method", false, false, true, 78))) {
// line 79
yield " ";
$context['_parent'] = $context;
$context['_seq'] = CoreExtension::ensureTraversable($this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "relations", "Teaser"));
$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["teaser"]) {
// line 80
yield " <div class=\"teaser\">
<div class=\"img-container\">
";
// line 82
yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "image", [], "any", false, false, true, 82), "thumbnail", ["MuldenTeaser"], "method", false, false, true, 82), "html", [], "any", false, false, true, 82), 82, $this->source);
yield "
</div>
<div class=\"content\">
<div class=\"headline\">
";
// line 87
yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "headline", [], "any", false, false, true, 87), 87, $this->source);
yield "
</div>
<div class=\"text lauf\">
";
// line 90
yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "text", [], "any", false, false, true, 90), 90, $this->source);
yield "
</div>
";
// line 93
if ((isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 93, $this->source); })())) {
// line 94
yield " <p class=\"card-link\" style=\"margin-bottom: 0;\">
";
// line 95
yield $this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 95), 95, $this->source);
yield "
</p>
";
} elseif (( ! // line 97
(isset($context["editmode"]) || array_key_exists("editmode", $context) ? $context["editmode"] : (function () { throw new RuntimeError('Variable "editmode" does not exist.', 97, $this->source); })()) && !Twig\Extension\CoreExtension::testEmpty(CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 97)))) {
// line 98
yield " <div class=\"btn secondary\">
";
// line 99
if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 99), "target", [], "any", false, false, true, 99)) {
// line 100
yield " ";
$context["target"] = CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 100), "target", [], "any", false, false, true, 100);
// line 101
yield " ";
} else {
// line 102
yield " ";
$context["target"] = "_self";
// line 103
yield " ";
}
// line 104
yield " <a class=\"flex\" href=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 104), "href", [], "any", false, false, true, 104), 104, $this->source), "html", null, true);
yield "\" target=\"";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed((isset($context["target"]) || array_key_exists("target", $context) ? $context["target"] : (function () { throw new RuntimeError('Variable "target" does not exist.', 104, $this->source); })()), 104, $this->source), "html", null, true);
yield "\">
<span>";
// line 105
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->sandbox->ensureToStringAllowed(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["teaser"], "link", [], "any", false, false, true, 105), "getText", [], "method", false, false, true, 105), 105, $this->source), "html", null, true);
yield "
";
// line 114
yield " </span>
</a>
<div class=\"button-shape\">
";
// line 117
yield Twig\Extension\CoreExtension::include($this->env, $context, "svg/button-shape.html.twig");
yield "
</div>
</div>
";
}
// line 122
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['teaser'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 126
yield " ";
}
// line 127
yield " </div>
</div>
</section>";
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
yield from [];
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName(): string
{
return "areas/cards/view.html.twig";
}
/**
* @codeCoverageIgnore
*/
public function isTraitable(): bool
{
return false;
}
/**
* @codeCoverageIgnore
*/
public function getDebugInfo(): array
{
return array ( 263 => 127, 260 => 126, 243 => 122, 235 => 117, 230 => 114, 226 => 105, 219 => 104, 216 => 103, 213 => 102, 210 => 101, 207 => 100, 205 => 99, 202 => 98, 200 => 97, 195 => 95, 192 => 94, 190 => 93, 184 => 90, 178 => 87, 170 => 82, 166 => 80, 148 => 79, 146 => 78, 143 => 77, 140 => 70, 138 => 69, 135 => 68, 130 => 66, 126 => 65, 121 => 64, 119 => 63, 115 => 61, 112 => 57, 110 => 56, 102 => 52, 92 => 45, 85 => 40, 83 => 31, 74 => 24, 72 => 23, 68 => 21, 66 => 20, 64 => 19, 61 => 18, 57 => 16, 55 => 15, 52 => 14, 50 => 1,);
}
public function getSourceContext(): Source
{
return new Source("{% set headlineTag = pimcore_select('headline1', {
'store': [
['none', 'none'],
['h1', 'H1'],
['h2', 'H2'],
['h3', 'H3'],
['h4', 'H4'],
['h5', 'H5'],
['h6', 'H6'],
],
'defaultValue': '',
'reload': true,
}) %}
{% if headlineTag.isEmpty() %}
{% do headlineTag.setDataFromResource('h2') %}
{% endif %}
{% set headline1 = headlineTag.data != 'none' ? headlineTag.data|raw : 'span'|raw %}
{% set headline2 = headlineTag.data != 'none' ? '</' ~ headlineTag.data|raw ~ '>' : '</span>'|raw %}
{% if editmode %}
<div class=\"edit-box\">
<h1>KONFIGURATIONEN FÜR DEN AREABRICK:</h1>
<div class=\"flex gap-20\">
<div class=\"content flex column 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\">
<p class=\"edit-p\">Titel-Typ definieren:</p>
{{ headlineTag|raw }}
</div>
</div>
</div>
</div>
</div>
{% endif %}
<section class=\"cards mulden-teaser {{ pimcore_select('MarginBottom').getData() }}\">
<div class=\"container\">
<div class=\"content-container\">
{% if editmode %}
<span class=\"mulden-title\">{{ pimcore_textarea(\"headline\",{
\"nl2br\": true,
\"height\": 200,
\"placeholder\": \"HAUPT ÜBERSCHRIFT FÜR DIESE AREA\"
}) }}
</span>
{% elseif not editmode and not pimcore_textarea('headline').isEmpty() %}
<{{headline1|raw}} class=\"mulden-title\">
{{ pimcore_textarea('headline').getData() | nl2br }}
{{ headline2|raw }}
{% endif %}
{% if editmode %}
{{ pimcore_relations(\"Teaser\", {
\"title\": \"Cards Objekte ablegen\",
\"types\": [\"object\"],
\"subtypes\": {
\"object\": [\"object\"]
},
\"classes\": [\"Card\"]
}) }}
{% elseif not editmode and not pimcore_relations(\"Teaser\").isEmpty() %}
{% for teaser in pimcore_relations(\"Teaser\") %}
<div class=\"teaser\">
<div class=\"img-container\">
{{ teaser.image.thumbnail('MuldenTeaser').html | raw }}
</div>
<div class=\"content\">
<div class=\"headline\">
{{ teaser.headline | raw }}
</div>
<div class=\"text lauf\">
{{ teaser.text | raw }}
</div>
{% if editmode %}
<p class=\"card-link\" style=\"margin-bottom: 0;\">
{{ teaser.link | raw }}
</p>
{% elseif not editmode and not teaser.link is empty %}
<div class=\"btn secondary\">
{% if teaser.link.target %}
{% set target = teaser.link.target %}
{% else %}
{% set target = '_self' %}
{% endif %}
<a class=\"flex\" href=\"{{ teaser.link.href }}\" target=\"{{ target }}\">
<span>{{ teaser.link.getText() }}
{# <svg width=\"15.708\" height=\"10.709\" viewBox=\"0 0 15.708 10.709\">
<g transform=\"translate(0 0.354)\">
<g transform=\"translate(0)\">
<path class=\"line\" d=\"M7.5,18h15\" transform=\"translate(-7.5 -13)\" fill=\"none\" stroke=\"#fff\" stroke-linejoin=\"round\" stroke-width=\"1\"/>
<path class=\"arrow\" d=\"M18,7.5l5.026,5L18,17.5\" transform=\"translate(-8.027 -7.5)\" fill=\"none\" stroke=\"#fff\" stroke-width=\"1\"/>
</g>
</g>
</svg> #}
</span>
</a>
<div class=\"button-shape\">
{{include('svg/button-shape.html.twig')}}
</div>
</div>
{% endif %}
</div>
</div>
{% endfor %}
{% endif %}
</div>
</div>
</section>", "areas/cards/view.html.twig", "/home/httpd/vhosts/annavation.a4interactive.ch/httpdocs/dev/templates/areas/cards/view.html.twig");
}
public function checkSecurity()
{
static $tags = ["set" => 1, "if" => 15, "do" => 16, "for" => 79];
static $filters = ["raw" => 19, "escape" => 52, "nl2br" => 65];
static $functions = ["pimcore_select" => 1, "pimcore_textarea" => 57, "pimcore_relations" => 70, "include" => 117];
try {
$this->sandbox->checkSecurity(
['set', 'if', 'do', 'for'],
['raw', 'escape', 'nl2br'],
['pimcore_select', 'pimcore_textarea', '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;
}
}
}