<?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;
/* areas/carousel/view.html.twig */
class __TwigTemplate_33ac0a25b5c98b3c5681ba4637762d50 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
'css' => [$this, 'block_css'],
];
$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", "areas/carousel/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/carousel/view.html.twig"));
// line 1
$context["randomId"] = ("swiper_" . twig_random($this->env));
// line 2
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=\"container\">
";
// line 5
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "block", "carouselblock"), "iterator", [], "any", false, false, true, 5));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 6
echo " <div style=\"background: #fff; padding: 20px;\">
<p>Link:<br>";
// line 7
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "link", "link", ["required" => "linkonly"]);
// line 9
echo "</p>
<p>Kép (1920x1200px):<br>";
// line 10
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", "image");
echo "</p>
<h2>";
// line 11
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "subline", ["placeholder" => "Szöveg 1. sor"]);
echo "</h2>
<h1>";
// line 12
echo $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", "headerline", ["placeholder" => "Szöveg 2. sor"]);
echo "</h1>
<hr>
</div>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 16
echo " </div>
";
} else {
// line 18
echo " <section id=\"homepage-slider\" class=\"position-relative\">
<div class=\"container\">
<div class=\"swiper-container homepage-slider ";
// line 20
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId", $context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.', 20, $this->source); })()), 20, $this->source), "html", null, true);
echo "\">
<div class=\"swiper-wrapper\">
";
// line 22
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "block", "carouselblock"), "iterator", [], "any", false, false, true, 22));
foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
// line 23
echo " <a href=\"";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "link", "link"), "getHref", [], "method", false, false, true, 23), 23, $this->source), "html", null, true);
echo "\" class=\"swiper-slide bg\"
style=\"background: url('";
// line 24
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "image", "image"), "getSrc", [], "method", false, false, true, 24), 24, $this->source), "html", null, true);
echo "')\">
<div class=\"content\">
<div>
";
// line 27
if ( !twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "subline"), "isEmpty", [], "method", false, false, true, 27)) {
// line 28
echo " <p>";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "input", "subline"), "getData", [], "method", false, false, true, 28), 28, $this->source), "html", null, true);
echo "</p>
";
}
// line 30
echo " ";
if ( !twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", "headerline"), "isEmpty", [], "method", false, false, true, 30)) {
// line 31
echo " <h2>";
echo twig_nl2br(twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed(twig_get_attribute($this->env, $this->source, $this->extensions['Pimcore\Twig\Extension\DocumentEditableExtension']->renderEditable($context, "textarea", "headerline"), "getData", [], "method", false, false, true, 31), 31, $this->source), "html", null, true));
echo "</h2>
";
}
// line 33
echo " </div>
</div>
</a>
";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 37
echo " </div>
<div class=\"swiper-pagination\"></div>
<div class=\"swiper-button-prev\"></div>
<div class=\"swiper-button-next\"></div>
</div>
</div>
</section>
";
// line 45
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "appendFile", ["https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js"], "method", false, false, true, 45);
// line 46
echo "
";
// line 47
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "captureStart", ["APPEND"], "method", false, false, true, 47);
// line 48
echo " const swiper_";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId", $context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.', 48, $this->source); })()), 48, $this->source), "html", null, true);
echo " = new Swiper('.";
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId", $context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.', 48, $this->source); })()), 48, $this->source), "html", null, true);
echo "', {
// Optional parameters
direction: 'horizontal',
loop: true,
slidesPerView: 1,
autoplay: {
delay: 3000,
},
// If we need pagination
pagination: {
el: '.";
// line 59
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId", $context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.', 59, $this->source); })()), 59, $this->source), "html", null, true);
echo " .swiper-pagination',
},
// Navigation arrows
navigation: {
nextEl: '.";
// line 64
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId", $context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.', 64, $this->source); })()), 64, $this->source), "html", null, true);
echo " .swiper-button-next',
prevEl: '.";
// line 65
echo twig_escape_filter($this->env, $this->sandbox->ensureToStringAllowed((isset($context["randomId"]) || array_key_exists("randomId", $context) ? $context["randomId"] : (function () { throw new RuntimeError('Variable "randomId" does not exist.', 65, $this->source); })()), 65, $this->source), "html", null, true);
echo " .swiper-button-prev',
},
});
";
// line 68
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_script')->getCallable()(), "captureEnd", [], "method", false, false, true, 68);
// line 69
echo "
";
// line 70
$this->displayBlock('css', $context, $blocks);
}
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function block_css($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(), "block", "css"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "css"));
// line 71
echo " ";
twig_get_attribute($this->env, $this->source, $this->env->getFunction('pimcore_head_link')->getCallable()(), "appendStylesheet", ["https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css"], "method", false, false, true, 71);
// line 72
echo " ";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "areas/carousel/view.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 220 => 72, 217 => 71, 197 => 70, 194 => 69, 192 => 68, 186 => 65, 182 => 64, 174 => 59, 157 => 48, 155 => 47, 152 => 46, 150 => 45, 140 => 37, 131 => 33, 125 => 31, 122 => 30, 116 => 28, 114 => 27, 108 => 24, 103 => 23, 99 => 22, 94 => 20, 90 => 18, 86 => 16, 76 => 12, 72 => 11, 68 => 10, 65 => 9, 63 => 7, 60 => 6, 56 => 5, 53 => 4, 51 => 3, 48 => 2, 46 => 1,);
}
public function getSourceContext()
{
return new Source("{% set randomId = 'swiper_' ~ random() %}
{% if editmode %}
<div class=\"container\">
{% for i in pimcore_block('carouselblock').iterator %}
<div style=\"background: #fff; padding: 20px;\">
<p>Link:<br>{{ pimcore_link('link', {
'required': 'linkonly'
}) }}</p>
<p>Kép (1920x1200px):<br>{{ pimcore_image('image') }}</p>
<h2>{{ pimcore_input('subline', {'placeholder': 'Szöveg 1. sor'}) }}</h2>
<h1>{{ pimcore_textarea('headerline', {'placeholder': 'Szöveg 2. sor'}) }}</h1>
<hr>
</div>
{% endfor %}
</div>
{% else %}
<section id=\"homepage-slider\" class=\"position-relative\">
<div class=\"container\">
<div class=\"swiper-container homepage-slider {{ randomId }}\">
<div class=\"swiper-wrapper\">
{% for i in pimcore_block('carouselblock').iterator %}
<a href=\"{{ pimcore_link('link').getHref() }}\" class=\"swiper-slide bg\"
style=\"background: url('{{ pimcore_image('image').getSrc() }}')\">
<div class=\"content\">
<div>
{% if not pimcore_input('subline').isEmpty() %}
<p>{{ pimcore_input('subline').getData() }}</p>
{% endif %}
{% if not pimcore_textarea('headerline').isEmpty() %}
<h2>{{ pimcore_textarea('headerline').getData() | nl2br }}</h2>
{% endif %}
</div>
</div>
</a>
{% endfor %}
</div>
<div class=\"swiper-pagination\"></div>
<div class=\"swiper-button-prev\"></div>
<div class=\"swiper-button-next\"></div>
</div>
</div>
</section>
{% do pimcore_head_script().appendFile('https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.js') %}
{% do pimcore_head_script().captureStart('APPEND') %}
const swiper_{{ randomId }} = new Swiper('.{{ randomId }}', {
// Optional parameters
direction: 'horizontal',
loop: true,
slidesPerView: 1,
autoplay: {
delay: 3000,
},
// If we need pagination
pagination: {
el: '.{{ randomId }} .swiper-pagination',
},
// Navigation arrows
navigation: {
nextEl: '.{{ randomId }} .swiper-button-next',
prevEl: '.{{ randomId }} .swiper-button-prev',
},
});
{% do pimcore_head_script().captureEnd() %}
{% block css %}
{% do pimcore_head_link().appendStylesheet('https://cdn.jsdelivr.net/npm/swiper@9/swiper-bundle.min.css') %}
{% endblock %}
{% endif %}", "areas/carousel/view.html.twig", "/home/zoltan/public_html/boutique-v2/templates/areas/carousel/view.html.twig");
}
public function checkSecurity()
{
static $tags = array("set" => 1, "if" => 3, "for" => 5, "do" => 45, "block" => 70);
static $filters = array("escape" => 20, "nl2br" => 31);
static $functions = array("random" => 1, "pimcore_block" => 5, "pimcore_link" => 7, "pimcore_image" => 10, "pimcore_input" => 11, "pimcore_textarea" => 12, "pimcore_head_script" => 45, "pimcore_head_link" => 71);
try {
$this->sandbox->checkSecurity(
['set', 'if', 'for', 'do', 'block'],
['escape', 'nl2br'],
['random', 'pimcore_block', 'pimcore_link', 'pimcore_image', 'pimcore_input', 'pimcore_textarea', 'pimcore_head_script', 'pimcore_head_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;
}
}
}