<?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;
/* @econdWebAnalytics/storefront/page/content/detail.html.twig */
class __TwigTemplate_921de5f36a85790dee9fdeecb1da270c 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_5a27a8ba21ca79b61932376b2fa922d2 = $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@econdWebAnalytics/storefront/page/content/detail.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@econdWebAnalytics/storefront/page/content/detail.html.twig"));
$this->parent = $this->loadTemplate("@Storefront/storefront/page/content/detail.html.twig", "@econdWebAnalytics/storefront/page/content/detail.html.twig", 2);
$this->parent->display($context, array_merge($this->blocks, $blocks));
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
// line 5
public function block_page_content_sections_inner($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", "page_content_sections_inner"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content_sections_inner"));
// line 6
echo " <div class=\"cms-sections\">
";
// line 7
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, ($context["cmsPage"] ?? null), "sections", [], "any", false, false, false, 7));
$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 8
echo " ";
$context["sectionBgColor"] = sw_get_attribute($this->env, $this->source, $context["section"], "backgroundColor", [], "any", false, false, false, 8);
// line 9
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, 9));
// line 10
echo " ";
$context["sectionBgImgMode"] = sw_get_attribute($this->env, $this->source, $context["section"], "backgroundMediaMode", [], "any", false, false, false, 10);
// line 11
echo " ";
$context["sectionClasses"] = [0 => sw_get_attribute($this->env, $this->source, $context["section"], "cssClass", [], "any", false, false, false, 11), 1 => ("pos-" . sw_get_attribute($this->env, $this->source, $context["section"], "position", [], "any", false, false, false, 11)), 2 => ("cms-section-" . sw_get_attribute($this->env, $this->source, $context["section"], "type", [], "any", false, false, false, 11))];
// line 12
echo " ";
if (($context["sectionBgImg"] ?? null)) {
// line 13
echo " ";
$context["sectionClasses"] = twig_array_merge([0 => "bg-image"], ($context["sectionClasses"] ?? null));
// line 14
echo " ";
}
// line 15
echo " ";
if (($context["sectionBgColor"] ?? null)) {
// line 16
echo " ";
$context["sectionClasses"] = twig_array_merge([0 => "bg-color"], ($context["sectionClasses"] ?? null));
// line 17
echo " ";
}
// line 18
echo " ";
if ((null === sw_get_attribute($this->env, $this->source, $context["section"], "visibility", [], "any", false, false, false, 18))) {
// line 19
echo " ";
$context["visibility"] = ["mobile" => true, "tablet" => true, "desktop" => true];
// line 24
echo " ";
} else {
// line 25
echo " ";
$context["visibility"] = sw_get_attribute($this->env, $this->source, $context["section"], "visibility", [], "any", false, false, false, 25);
// line 26
echo " ";
}
// line 27
echo " ";
if ( !sw_get_attribute($this->env, $this->source, ($context["visibility"] ?? null), "mobile", [], "any", false, false, false, 27)) {
// line 28
echo " ";
$context["sectionClasses"] = twig_array_merge([0 => "hidden-mobile"], ($context["sectionClasses"] ?? null));
// line 29
echo " ";
}
// line 30
echo " ";
if ( !sw_get_attribute($this->env, $this->source, ($context["visibility"] ?? null), "tablet", [], "any", false, false, false, 30)) {
// line 31
echo " ";
$context["sectionClasses"] = twig_array_merge([0 => "hidden-tablet"], ($context["sectionClasses"] ?? null));
// line 32
echo " ";
}
// line 33
echo " ";
if ( !sw_get_attribute($this->env, $this->source, ($context["visibility"] ?? null), "desktop", [], "any", false, false, false, 33)) {
// line 34
echo " ";
$context["sectionClasses"] = twig_array_merge([0 => "hidden-desktop"], ($context["sectionClasses"] ?? null));
// line 35
echo " ";
}
// line 36
echo " ";
$this->displayBlock('page_content_section', $context, $blocks);
// line 42
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 43
echo " </div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
// line 36
public function block_page_content_section($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", "page_content_section"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "page_content_section"));
// line 37
echo " <div class=\"cms-section ";
echo sw_escape_filter($this->env, twig_join_filter(($context["sectionClasses"] ?? null), " "), "html", null, true);
echo "\"
style=\"";
// line 38
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, 38), "html", null, true);
echo ";";
}
echo "\">
";
// line 39
((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, 39)) . ".html.twig"));
return $this->loadTemplate($includeTemplate ?? null, "@econdWebAnalytics/storefront/page/content/detail.html.twig", 39);
})())->display($context);
// line 40
echo " </div>
";
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@econdWebAnalytics/storefront/page/content/detail.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 227 => 40, 219 => 39, 204 => 38, 199 => 37, 189 => 36, 178 => 43, 164 => 42, 161 => 36, 158 => 35, 155 => 34, 152 => 33, 149 => 32, 146 => 31, 143 => 30, 140 => 29, 137 => 28, 134 => 27, 131 => 26, 128 => 25, 125 => 24, 122 => 19, 119 => 18, 116 => 17, 113 => 16, 110 => 15, 107 => 14, 104 => 13, 101 => 12, 98 => 11, 95 => 10, 92 => 9, 89 => 8, 72 => 7, 69 => 6, 59 => 5, 36 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/page/content/detail.html.twig' %}
{# @var cmsPage \\Shopware\\Core\\Content\\Cms\\CmsPageEntity #}
{# @var landingPage \\Shopware\\Core\\Content\\LandingPage\\LandingPageEntity #}
{% 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 %}
{% if section.visibility is null %}
{% set visibility = {
mobile: true,
tablet: true,
desktop: true
} %}
{% else %}
{% set visibility = section.visibility %}
{% endif %}
{% if not visibility.mobile %}
{% set sectionClasses = ['hidden-mobile']|merge(sectionClasses) %}
{% endif %}
{% if not visibility.tablet %}
{% set sectionClasses = ['hidden-tablet']|merge(sectionClasses) %}
{% endif %}
{% if not visibility.desktop %}
{% set sectionClasses = ['hidden-desktop']|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 %}", "@econdWebAnalytics/storefront/page/content/detail.html.twig", "/var/www/shopware6/custom/plugins/econdWebAnalytics/src/Resources/views/storefront/page/content/detail.html.twig");
}
}