<?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;
/* @TcinnThemeWareModern/storefront/section/cms-section-block-container.html.twig */
class __TwigTemplate_3eb9fd9a172fe577da1587b003cad509 extends Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->blocks = [
'section_content_block' => [$this, 'block_section_content_block'],
];
}
protected function doGetParent(array $context)
{
// line 2
return "@Storefront/storefront/section/cms-section-block-container.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", "@TcinnThemeWareModern/storefront/section/cms-section-block-container.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@TcinnThemeWareModern/storefront/section/cms-section-block-container.html.twig"));
// line 8
$context["twtProductDetailCrossSellingShow"] = $this->extensions['Shopware\Storefront\Framework\Twig\Extension\ConfigExtension']->theme($context, "twt-product-detail-cross-selling-show");
// line 2
$this->parent = $this->loadTemplate("@Storefront/storefront/section/cms-section-block-container.html.twig", "@TcinnThemeWareModern/storefront/section/cms-section-block-container.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 14
public function block_section_content_block($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", "section_content_block"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "section_content_block"));
// line 15
echo " ";
$context["showBlock"] = true;
// line 16
echo "
";
// line 18
echo " ";
if (((sw_get_attribute($this->env, $this->source, ($context["block"] ?? null), "type", [], "any", false, false, false, 18) == "cross-selling") && (($context["twtProductDetailCrossSellingShow"] ?? null) == 1))) {
// line 19
echo " ";
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(sw_get_attribute($this->env, $this->source, ($context["block"] ?? null), "slots", [], "any", false, false, false, 19));
foreach ($context['_seq'] as $context["_key"] => $context["element"]) {
// line 20
echo " ";
// line 21
echo " ";
if ((sw_get_attribute($this->env, $this->source, $context["element"], "type", [], "any", false, false, false, 21) == "cross-selling")) {
// line 22
echo " ";
if ( !twig_test_empty(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, $context["element"], "data", [], "any", false, false, false, 22), "crossSellings", [], "any", false, false, false, 22))) {
echo " ";
// line 23
echo " ";
// line 24
echo " ";
$context["showBlock"] = true;
// line 25
echo " ";
} else {
// line 26
echo " ";
// line 27
echo " ";
$context["showBlock"] = false;
// line 28
echo " ";
}
// line 29
echo " ";
} else {
// line 30
echo " ";
// line 31
echo " ";
$context["showBlock"] = true;
// line 32
echo " ";
}
// line 33
echo " ";
}
$_parent = $context['_parent'];
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['element'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
// line 34
echo " ";
}
// line 35
echo "
";
// line 37
echo " ";
if ((sw_get_attribute($this->env, $this->source, ($context["block"] ?? null), "type", [], "any", false, false, false, 37) == "twt-listing-subcategories")) {
// line 38
echo " ";
// line 39
echo " ";
if ((twig_test_empty(sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "header", [], "any", false, false, false, 39), "navigation", [], "any", false, false, false, 39), "active", [], "any", false, false, false, 39), "childCount", [], "any", false, false, false, 39)) || (sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, sw_get_attribute($this->env, $this->source, ($context["page"] ?? null), "header", [], "any", false, false, false, 39), "navigation", [], "any", false, false, false, 39), "active", [], "any", false, false, false, 39), "childCount", [], "any", false, false, false, 39) == 0))) {
// line 40
echo " ";
// line 41
echo " ";
$context["showBlock"] = false;
// line 42
echo " ";
}
// line 43
echo " ";
}
// line 44
echo "
";
// line 45
if (($context["showBlock"] ?? null)) {
// line 46
echo " ";
// line 47
echo " ";
$this->displayParentBlock("section_content_block", $context, $blocks);
echo "
";
}
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
}
public function getTemplateName()
{
return "@TcinnThemeWareModern/storefront/section/cms-section-block-container.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 159 => 47, 157 => 46, 155 => 45, 152 => 44, 149 => 43, 146 => 42, 143 => 41, 141 => 40, 138 => 39, 136 => 38, 133 => 37, 130 => 35, 127 => 34, 121 => 33, 118 => 32, 115 => 31, 113 => 30, 110 => 29, 107 => 28, 104 => 27, 102 => 26, 99 => 25, 96 => 24, 94 => 23, 90 => 22, 87 => 21, 85 => 20, 80 => 19, 77 => 18, 74 => 16, 71 => 15, 61 => 14, 50 => 2, 48 => 8, 35 => 2,);
}
public function getSourceContext()
{
return new Source("{% sw_extends '@Storefront/storefront/section/cms-section-block-container.html.twig' %}
{# TODO: prüfen... #}
{# ---------------- START: SET TEMPLATE VARS ---------------- #}
{# ThemeWare: Set theme variables #}
{% set twtProductDetailCrossSellingShow = theme_config('twt-product-detail-cross-selling-show') %}
{# ---------------- END: SET TEMPLATE VARS ---------------- #}
{# TODO: HC-Architecture..! #}
{# ThemeWare: Delete blocks if they are empty #}
{% block section_content_block %}
{% set showBlock = true %}
{# ThemeWare: Check if 'Cross Selling' block is used #}
{% if block.type == 'cross-selling' and twtProductDetailCrossSellingShow == 1 %}
{% for element in block.slots %}
{# ThemeWare: Check if 'Cross Selling' element is available #}
{% if element.type == 'cross-selling' %}
{% if element.data.crossSellings is not empty %} {# element.data.crossSellings.elements #}
{# ThemeWare: 'Cross Selling' element available and NOT empty = show block #}
{% set showBlock = true %}
{% else %}
{# ThemeWare: 'Cross Selling' element available but empty = hide block #}
{% set showBlock = false %}
{% endif %}
{% else %}
{# ThemeWare: Not a 'Cross Selling' element #}
{% set showBlock = true %}
{% endif %}
{% endfor %}
{% endif %}
{# ThemeWare: Check if 'listing subcategories' block is used #}
{% if block.type == 'twt-listing-subcategories' %}
{# ThemeWare: Check if subcategories existing #}
{% if page.header.navigation.active.childCount is empty or page.header.navigation.active.childCount == 0 %}
{# ThemeWare: No subcategories existing = hide block #}
{% set showBlock = false %}
{% endif %}
{% endif %}
{% if showBlock %}
{# Default block = show block #}
{{ parent() }}
{% endif %}
{% endblock %}", "@TcinnThemeWareModern/storefront/section/cms-section-block-container.html.twig", "/var/customers/webs/kew/htdocs6/custom/plugins/TcinnThemeWareModern/src/Resources/views/storefront/section/cms-section-block-container.html.twig");
}
}