var/cache/dev_h61dab171fcb3dd073fc68bfbeb4d9256/twig/d6/d68f3f8c7c46de34605966c72669c506.php line 47

Open in your IDE?
  1. <?php
  2. use Twig\Environment;
  3. use function Shopware\Core\Framework\Adapter\Twig\sw_get_attribute;
  4. use function Shopware\Core\Framework\Adapter\Twig\sw_escape_filter;
  5. use Twig\Error\LoaderError;
  6. use Twig\Error\RuntimeError;
  7. use Twig\Extension\SandboxExtension;
  8. use Twig\Markup;
  9. use Twig\Sandbox\SecurityError;
  10. use Twig\Sandbox\SecurityNotAllowedTagError;
  11. use Twig\Sandbox\SecurityNotAllowedFilterError;
  12. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  13. use Twig\Source;
  14. use Twig\Template;
  15. /* @Storefront/storefront/page/content/detail.html.twig */
  16. class __TwigTemplate_66de5a8ab00dd2af2adce10c9449516e extends Template
  17. {
  18.     private $source;
  19.     private $macros = [];
  20.     public function __construct(Environment $env)
  21.     {
  22.         parent::__construct($env);
  23.         $this->source $this->getSourceContext();
  24.         $this->parent false;
  25.         $this->blocks = [
  26.             'page_content_sections_inner' => [$this'block_page_content_sections_inner'],
  27.             'page_content_section' => [$this'block_page_content_section'],
  28.         ];
  29.     }
  30.     protected function doDisplay(array $context, array $blocks = [])
  31.     {
  32.         $macros $this->macros;
  33.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  34.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Storefront/storefront/page/content/detail.html.twig"));
  35.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  36.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@Storefront/storefront/page/content/detail.html.twig"));
  37.         // line 3
  38.         $this->displayBlock('page_content_sections_inner'$context$blocks);
  39.         
  40.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  41.         
  42.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  43.     }
  44.     public function block_page_content_sections_inner($context, array $blocks = [])
  45.     {
  46.         $macros $this->macros;
  47.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  48.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_content_sections_inner"));
  49.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  50.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_content_sections_inner"));
  51.         // line 4
  52.         echo "    <div class=\"cms-sections\">
  53.         ";
  54.         // line 5
  55.         $context['_parent'] = $context;
  56.         $context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env$this->source, ($context["cmsPage"] ?? null), "sections", [], "any"falsefalsefalse5));
  57.         $context['loop'] = [
  58.           'parent' => $context['_parent'],
  59.           'index0' => 0,
  60.           'index'  => 1,
  61.           'first'  => true,
  62.         ];
  63.         if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof \Countable)) {
  64.             $length count($context['_seq']);
  65.             $context['loop']['revindex0'] = $length 1;
  66.             $context['loop']['revindex'] = $length;
  67.             $context['loop']['length'] = $length;
  68.             $context['loop']['last'] = === $length;
  69.         }
  70.         foreach ($context['_seq'] as $context["_key"] => $context["section"]) {
  71.             // line 6
  72.             echo "            ";
  73.             $context["sectionBgColor"] = sw_get_attribute($this->env$this->source$context["section"], "backgroundColor", [], "any"falsefalsefalse6);
  74.             // line 7
  75.             echo "            ";
  76.             $context["sectionBgImg"] = $this->extensions['Shopware\Storefront\Framework\Twig\Extension\UrlEncodingTwigFilter']->encodeMediaUrl(sw_get_attribute($this->env$this->source$context["section"], "backgroundMedia", [], "any"falsefalsefalse7));
  77.             // line 8
  78.             echo "            ";
  79.             $context["sectionBgImgMode"] = sw_get_attribute($this->env$this->source$context["section"], "backgroundMediaMode", [], "any"falsefalsefalse8);
  80.             // line 9
  81.             echo "
  82.             ";
  83.             // line 10
  84.             $context["sectionClasses"] = [=> sw_get_attribute($this->env$this->source$context["section"], "cssClass", [], "any"falsefalsefalse10), => ("pos-" sw_get_attribute($this->env$this->source$context["section"], "position", [], "any"falsefalsefalse10)), => ("cms-section-" sw_get_attribute($this->env$this->source$context["section"], "type", [], "any"falsefalsefalse10))];
  85.             // line 11
  86.             echo "
  87.             ";
  88.             // line 12
  89.             if (($context["sectionBgImg"] ?? null)) {
  90.                 // line 13
  91.                 echo "                ";
  92.                 $context["sectionClasses"] = twig_array_merge([=> "bg-image"], ($context["sectionClasses"] ?? null));
  93.                 // line 14
  94.                 echo "            ";
  95.             }
  96.             // line 15
  97.             echo "
  98.             ";
  99.             // line 16
  100.             if (($context["sectionBgColor"] ?? null)) {
  101.                 // line 17
  102.                 echo "                ";
  103.                 $context["sectionClasses"] = twig_array_merge([=> "bg-color"], ($context["sectionClasses"] ?? null));
  104.                 // line 18
  105.                 echo "            ";
  106.             }
  107.             // line 19
  108.             echo "
  109.             ";
  110.             // line 20
  111.             if ((null === sw_get_attribute($this->env$this->source$context["section"], "visibility", [], "any"falsefalsefalse20))) {
  112.                 // line 21
  113.                 echo "                ";
  114.                 $context["visibility"] = ["mobile" => true"tablet" => true"desktop" => true];
  115.                 // line 26
  116.                 echo "            ";
  117.             } else {
  118.                 // line 27
  119.                 echo "                ";
  120.                 $context["visibility"] = sw_get_attribute($this->env$this->source$context["section"], "visibility", [], "any"falsefalsefalse27);
  121.                 // line 28
  122.                 echo "            ";
  123.             }
  124.             // line 29
  125.             echo "
  126.             ";
  127.             // line 30
  128.             if ( !sw_get_attribute($this->env$this->source, ($context["visibility"] ?? null), "mobile", [], "any"falsefalsefalse30)) {
  129.                 // line 31
  130.                 echo "                ";
  131.                 $context["sectionClasses"] = twig_array_merge([=> "hidden-mobile"], ($context["sectionClasses"] ?? null));
  132.                 // line 32
  133.                 echo "            ";
  134.             }
  135.             // line 33
  136.             echo "            ";
  137.             if ( !sw_get_attribute($this->env$this->source, ($context["visibility"] ?? null), "tablet", [], "any"falsefalsefalse33)) {
  138.                 // line 34
  139.                 echo "                ";
  140.                 $context["sectionClasses"] = twig_array_merge([=> "hidden-tablet"], ($context["sectionClasses"] ?? null));
  141.                 // line 35
  142.                 echo "            ";
  143.             }
  144.             // line 36
  145.             echo "            ";
  146.             if ( !sw_get_attribute($this->env$this->source, ($context["visibility"] ?? null), "desktop", [], "any"falsefalsefalse36)) {
  147.                 // line 37
  148.                 echo "                ";
  149.                 $context["sectionClasses"] = twig_array_merge([=> "hidden-desktop"], ($context["sectionClasses"] ?? null));
  150.                 // line 38
  151.                 echo "            ";
  152.             }
  153.             // line 39
  154.             echo "
  155.             ";
  156.             // line 40
  157.             $this->displayBlock('page_content_section'$context$blocks);
  158.             // line 47
  159.             echo "        ";
  160.             ++$context['loop']['index0'];
  161.             ++$context['loop']['index'];
  162.             $context['loop']['first'] = false;
  163.             if (isset($context['loop']['length'])) {
  164.                 --$context['loop']['revindex0'];
  165.                 --$context['loop']['revindex'];
  166.                 $context['loop']['last'] = === $context['loop']['revindex0'];
  167.             }
  168.         }
  169.         $_parent $context['_parent'];
  170.         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['section'], $context['_parent'], $context['loop']);
  171.         $context array_intersect_key($context$_parent) + $_parent;
  172.         // line 48
  173.         echo "    </div>
  174. ";
  175.         
  176.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  177.         
  178.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  179.     }
  180.     // line 40
  181.     public function block_page_content_section($context, array $blocks = [])
  182.     {
  183.         $macros $this->macros;
  184.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  185.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_content_section"));
  186.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  187.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""page_content_section"));
  188.         // line 41
  189.         echo "                <div class=\"cms-section ";
  190.         echo sw_escape_filter($this->envtwig_join_filter(($context["sectionClasses"] ?? null), " "), "html"nulltrue);
  191.         echo "\"
  192.                      style=\"";
  193.         // line 42
  194.         if (($context["sectionBgColor"] ?? null)) {
  195.             echo "background-color: ";
  196.             echo sw_escape_filter($this->env, ($context["sectionBgColor"] ?? null), "html"nulltrue);
  197.             echo ";";
  198.         }
  199.         if (($context["sectionBgImg"] ?? null)) {
  200.             echo "background-image: url(";
  201.             echo sw_escape_filter($this->env, ($context["sectionBgImg"] ?? null), "html"nulltrue);
  202.             echo ");background-size: ";
  203.             echo sw_escape_filter($this->envsw_get_attribute($this->env$this->source, ($context["section"] ?? null), "backgroundMediaMode", [], "any"falsefalsefalse42), "html"nulltrue);
  204.             echo ";";
  205.         }
  206.         echo "\">
  207.                     ";
  208.         // line 44
  209.         ((function () use ($context$blocks) {
  210.             $finder $this->env->getExtension('Shopware\Core\Framework\Adapter\Twig\Extension\NodeExtension')->getFinder();
  211.             $includeTemplate $finder->find((("@Storefront/storefront/section/cms-section-" sw_get_attribute($this->env$this->source, ($context["section"] ?? null), "type", [], "any"falsefalsefalse44)) . ".html.twig"));
  212.             return $this->loadTemplate($includeTemplate ?? null"@Storefront/storefront/page/content/detail.html.twig"44);
  213.         })())->display($context);
  214.         // line 45
  215.         echo "                </div>
  216.             ";
  217.         
  218.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  219.         
  220.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  221.     }
  222.     public function getTemplateName()
  223.     {
  224.         return "@Storefront/storefront/page/content/detail.html.twig";
  225.     }
  226.     public function getDebugInfo()
  227.     {
  228.         return array (  235 => 45,  227 => 44,  211 => 42,  206 => 41,  196 => 40,  185 => 48,  171 => 47,  169 => 40,  166 => 39,  163 => 38,  160 => 37,  157 => 36,  154 => 35,  151 => 34,  148 => 33,  145 => 32,  142 => 31,  140 => 30,  137 => 29,  134 => 28,  131 => 27,  128 => 26,  125 => 21,  123 => 20,  120 => 19,  117 => 18,  114 => 17,  112 => 16,  109 => 15,  106 => 14,  103 => 13,  101 => 12,  98 => 11,  96 => 10,  93 => 9,  90 => 8,  87 => 7,  84 => 6,  67 => 5,  64 => 4,  45 => 3,);
  229.     }
  230.     public function getSourceContext()
  231.     {
  232.         return new Source("{# @var cmsPage \\Shopware\\Core\\Content\\Cms\\CmsPageEntity #}
  233. {# @var landingPage \\Shopware\\Core\\Content\\LandingPage\\LandingPageEntity #}
  234. {% block page_content_sections_inner %}
  235.     <div class=\"cms-sections\">
  236.         {% for section in cmsPage.sections %}
  237.             {% set sectionBgColor = section.backgroundColor %}
  238.             {% set sectionBgImg = section.backgroundMedia|sw_encode_media_url %}
  239.             {% set sectionBgImgMode = section.backgroundMediaMode %}
  240.             {% set sectionClasses = [section.cssClass, 'pos-' ~ section.position, 'cms-section-' ~ section.type] %}
  241.             {% if sectionBgImg %}
  242.                 {% set sectionClasses = ['bg-image']|merge(sectionClasses) %}
  243.             {% endif %}
  244.             {% if sectionBgColor %}
  245.                 {% set sectionClasses = ['bg-color']|merge(sectionClasses) %}
  246.             {% endif %}
  247.             {% if section.visibility is null %}
  248.                 {% set visibility = {
  249.                     mobile: true,
  250.                     tablet: true,
  251.                     desktop: true
  252.                 } %}
  253.             {% else %}
  254.                 {% set visibility = section.visibility %}
  255.             {% endif %}
  256.             {% if not visibility.mobile %}
  257.                 {% set sectionClasses = ['hidden-mobile']|merge(sectionClasses) %}
  258.             {% endif %}
  259.             {% if not visibility.tablet %}
  260.                 {% set sectionClasses = ['hidden-tablet']|merge(sectionClasses) %}
  261.             {% endif %}
  262.             {% if not visibility.desktop %}
  263.                 {% set sectionClasses = ['hidden-desktop']|merge(sectionClasses) %}
  264.             {% endif %}
  265.             {% block page_content_section %}
  266.                 <div class=\"cms-section {{ sectionClasses|join(' ') }}\"
  267.                      style=\"{% if sectionBgColor %}background-color: {{ sectionBgColor }};{% endif %}{% if sectionBgImg %}background-image: url({{ sectionBgImg }});background-size: {{ section.backgroundMediaMode }};{% endif %}\">
  268.                     {% sw_include \"@Storefront/storefront/section/cms-section-\" ~ section.type ~ \".html.twig\" %}
  269.                 </div>
  270.             {% endblock %}
  271.         {% endfor %}
  272.     </div>
  273. {% endblock %}
  274. ""@Storefront/storefront/page/content/detail.html.twig""/usr/www/users/betten/betten-abc-alt-und-tot.de/vendor/shopware/storefront/Resources/views/storefront/page/content/detail.html.twig");
  275.     }
  276. }