<?php
use Twig\Environment;
use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
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;
/* @Tuerschild_2/storefront/page/content/detail.html.twig */
class __TwigTemplate_6326c7c9438a058ddbe49d8471fa9e2a9ba1cfcf014a76344c7c9d28d79ca331 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'page_content_sections_inner' => [$this, 'block_page_content_sections_inner'],
'page_content_section' => [$this, 'block_page_content_section'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@Storefront/storefront/page/content/detail.html.twig";
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@Tuerschild_2/storefront/page/content/detail.html.twig"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@Tuerschild_2/storefront/page/content/detail.html.twig"));
$this->parent = $this->loadTemplate("@Storefront/storefront/page/content/detail.html.twig", "@Tuerschild_2/storefront/page/content/detail.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
}
// line 3
public function block_page_content_sections_inner($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content_sections_inner"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content_sections_inner"));
// line 4
echo " <div class=\"cms-sections\">
";
// line 5
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, ($context["cmsPage"] ?? null), "sections", [], "any", false, false, false, 5));
$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["section"]) {
// line 6
echo " ";
$context["sectionBgColor"] = sw_get_attribute($this->env, $this->source, $context["section"], "backgroundColor", [], "any", false, false, false, 6);
// line 7
echo " ";
$context["sectionBgImg"] = $this->extensions['Shopware\Storefront\Framework\Twig\Extension\UrlEncodingTwigFilter']->encodeMediaUrl(sw_get_attribute($this->env, $this->source, $context["section"], "backgroundMedia", [], "any", false, false, false, 7));
// line 8
echo " ";
$context["sectionBgImgMode"] = sw_get_attribute($this->env, $this->source, $context["section"], "backgroundMediaMode", [], "any", false, false, false, 8);
// line 9
echo "
";
// line 10
$context["sectionClasses"] = [0 => sw_get_attribute($this->env, $this->source, $context["section"], "cssClass", [], "any", false, false, false, 10), 1 => ("pos-" . sw_get_attribute($this->env, $this->source, $context["section"], "position", [], "any", false, false, false, 10)), 2 => ("cms-section-" . sw_get_attribute($this->env, $this->source, $context["section"], "type", [], "any", false, false, false, 10))];
// line 11
echo "
";
// line 12
if (($context["sectionBgImg"] ?? null)) {
// line 13
echo " ";
$context["sectionClasses"] = twig_array_merge([0 => "bg-image"], ($context["sectionClasses"] ?? null));
// line 14
echo " ";
}
// line 15
echo "
";
// line 16
if (($context["sectionBgColor"] ?? null)) {
// line 17
echo " ";
$context["sectionClasses"] = twig_array_merge([0 => "bg-color"], ($context["sectionClasses"] ?? null));
// line 18
echo " ";
}
// line 19
echo "
";
// line 20
$this->displayBlock('page_content_section', $context, $blocks);
// line 27
echo " ";
++$context['loop']['index0'];
++$context['loop']['index'];
$context['loop']['first'] = false;
if (isset($context['loop']['length'])) {
--$context['loop']['revindex0'];
--$context['loop']['revindex'];
$context['loop']['last'] = 0 === $context['loop']['revindex0'];
}
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['section'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 28
echo " </div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
// line 20
public function block_page_content_section($context, array $blocks = [])
{
$macros = $this->macros;
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->enter($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content_section"));
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02 = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->enter($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content_section"));
// line 21
echo " <div class=\"cms-section ";
echo sw_escape_filter($this->env, twig_join_filter(($context["sectionClasses"] ?? null), " "), "html", null, true);
echo "\"
style=\"";
// line 22
if (($context["sectionBgColor"] ?? null)) {
echo "background-color: ";
echo sw_escape_filter($this->env, ($context["sectionBgColor"] ?? null), "html", null, true);
echo ";";
}
if (($context["sectionBgImg"] ?? null)) {
echo "background-image: url(";
echo sw_escape_filter($this->env, ($context["sectionBgImg"] ?? null), "html", null, true);
echo ");background-size: ";
echo sw_escape_filter($this->env, sw_get_attribute($this->env, $this->source, ($context["section"] ?? null), "backgroundMediaMode", [], "any", false, false, false, 22), "html", null, true);
echo ";";
}
echo "\">
";
// line 24
((function () use ($context, $blocks) {
$finder = $this->env->getExtension('Shopware\Core\Framework\Adapter\Twig\Extension\NodeExtension')->getFinder();
$includeTemplate = $finder->find((("@Storefront/storefront/section/cms-section-" . sw_get_attribute($this->env, $this->source, ($context["section"] ?? null), "type", [], "any", false, false, false, 24)) . ".html.twig"));
return $this->loadTemplate($includeTemplate ?? null, "@Tuerschild_2/storefront/page/content/detail.html.twig", 24);
})())->display($context);
// line 25
echo " </div>
";
$__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
$__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
}
public function getTemplateName()
{
return "@Tuerschild_2/storefront/page/content/detail.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 194 => 25, 186 => 24, 170 => 22, 165 => 21, 155 => 20, 144 => 28, 130 => 27, 128 => 20, 125 => 19, 122 => 18, 119 => 17, 117 => 16, 114 => 15, 111 => 14, 108 => 13, 106 => 12, 103 => 11, 101 => 10, 98 => 9, 95 => 8, 92 => 7, 89 => 6, 72 => 5, 69 => 4, 59 => 3, 36 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/page/content/detail.html.twig' %}
{% block page_content_sections_inner %}
<div class=\"cms-sections\">
{% for section in cmsPage.sections %}
{% set sectionBgColor = section.backgroundColor %}
{% set sectionBgImg = section.backgroundMedia|sw_encode_media_url %}
{% set sectionBgImgMode = section.backgroundMediaMode %}
{% set sectionClasses = [section.cssClass, 'pos-' ~ section.position, 'cms-section-' ~ section.type] %}
{% if sectionBgImg %}
{% set sectionClasses = ['bg-image']|merge(sectionClasses) %}
{% endif %}
{% if sectionBgColor %}
{% set sectionClasses = ['bg-color']|merge(sectionClasses) %}
{% endif %}
{% block page_content_section %}
<div class=\"cms-section {{ sectionClasses|join(' ') }}\"
style=\"{% if sectionBgColor %}background-color: {{ sectionBgColor }};{% endif %}{% if sectionBgImg %}background-image: url({{ sectionBgImg }});background-size: {{ section.backgroundMediaMode }};{% endif %}\">
{% sw_include \"@Storefront/storefront/section/cms-section-\" ~ section.type ~ \".html.twig\" %}
</div>
{% endblock %}
{% endfor %}
</div>
{% endblock %}
", "@Tuerschild_2/storefront/page/content/detail.html.twig", "/data/www/stage.tuerschildshop/custom/plugins/Tuerschild_2/src/Resources/views/storefront/page/content/detail.html.twig");
}
}