<?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;
/* @SyliusShop/Taxon/_all_categories.html.twig */
class __TwigTemplate_996e5b7c933204ae867dc426d4d87003 extends \Twig\Template
{
private $source;
private $macros = [];
public function __construct(Environment $env)
{
parent::__construct($env);
$this->source = $this->getSourceContext();
$this->parent = false;
$this->blocks = [
];
}
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", "@SyliusShop/Taxon/_all_categories.html.twig"));
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@SyliusShop/Taxon/_all_categories.html.twig"));
// line 1
$context['_parent'] = $context;
$context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env, $this->source, (isset($context["taxon"]) || array_key_exists("taxon", $context) ? $context["taxon"] : (function () { throw new RuntimeError('Variable "taxon" does not exist.', 1, $this->source); })()), "enabledChildren", [], "any", false, false, false, 1));
$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["child"]) {
// line 2
echo " ";
$context["taxonItemImage"] = !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["child"], "imagesByType", [0 => "catalog"], "method", false, false, false, 2));
// line 3
echo " <div class=\"taxon-item row py-4";
if ( !twig_get_attribute($this->env, $this->source, $context["loop"], "first", [], "any", false, false, false, 3)) {
echo " mt-6";
}
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 3) % 2 == 0)) {
echo " bg-light";
}
echo "\">
";
// line 4
if ((isset($context["taxonItemImage"]) || array_key_exists("taxonItemImage", $context) ? $context["taxonItemImage"] : (function () { throw new RuntimeError('Variable "taxonItemImage" does not exist.', 4, $this->source); })())) {
// line 5
echo " <div class=\"taxon-item-img-wrap d-none d-lg-block col-lg-6 col-xxxxl-5 col-xxxxxl-4 ps-lg-4\">
<a href=\"";
// line 6
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => ((twig_get_attribute($this->env, $this->source, $context["child"], "redirect", [], "any", false, false, false, 6)) ? (twig_get_attribute($this->env, $this->source, $context["child"], "redirect", [], "any", false, false, false, 6)) : (twig_get_attribute($this->env, $this->source, $context["child"], "slug", [], "any", false, false, false, 6))), "_locale" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["child"], "translation", [], "any", false, false, false, 6), "locale", [], "any", false, false, false, 6)]), "html", null, true);
echo "\">
";
// line 8
echo " ";
// line 9
echo " ";
// line 10
echo " ";
// line 11
echo " ";
// line 12
echo " <img class=\"lazy taxon-item-img\" width=\"100%\" src=\"";
echo twig_escape_filter($this->env, $this->extensions['Sylius\Bundle\CoreBundle\Twig\FilterExtension']->filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["child"], "imagesByType", [0 => "catalog"], "method", false, false, false, 12), "first", [], "any", false, false, false, 12), "path", [], "any", false, false, false, 12), "app_shop_taxon_catalog_desktop_small"), "html", null, true);
echo "\" data-src=\"";
echo twig_escape_filter($this->env, $this->extensions['Sylius\Bundle\CoreBundle\Twig\FilterExtension']->filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["child"], "imagesByType", [0 => "catalog"], "method", false, false, false, 12), "first", [], "any", false, false, false, 12), "path", [], "any", false, false, false, 12), "app_shop_taxon_catalog_desktop"), "html", null, true);
echo "\" alt=\"";
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["child"], "name", [], "any", false, false, false, 12), "html", null, true);
echo "\">
</a>
</div>
";
}
// line 16
echo " <div class=\"taxon-item-text d-flex flex-column justify-content-center col-lg-6 col-xxxxl-7 col-xxxxxl-8";
if ((twig_get_attribute($this->env, $this->source, $context["loop"], "index", [], "any", false, false, false, 16) % 2 != 0)) {
echo " order-lg-first";
}
echo "\">
<div class=\"taxon-item-text-content";
// line 17
echo "\">
<h2 class=\"taxon-item-title custom-display-7 mb-0 text-center d-flex flex-column justify-content-center text-lg-start\"
onclick=\"window.location.href='";
// line 19
echo twig_escape_filter($this->env, $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("sylius_shop_product_index", ["slug" => ((twig_get_attribute($this->env, $this->source, $context["child"], "redirect", [], "any", false, false, false, 19)) ? (twig_get_attribute($this->env, $this->source, $context["child"], "redirect", [], "any", false, false, false, 19)) : (twig_get_attribute($this->env, $this->source, $context["child"], "slug", [], "any", false, false, false, 19))), "_locale" => twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["child"], "translation", [], "any", false, false, false, 19), "locale", [], "any", false, false, false, 19)]), "html", null, true);
echo "'\"
";
// line 20
if ((isset($context["taxonItemImage"]) || array_key_exists("taxonItemImage", $context) ? $context["taxonItemImage"] : (function () { throw new RuntimeError('Variable "taxonItemImage" does not exist.', 20, $this->source); })())) {
echo "style=\"background-image: url(";
echo twig_escape_filter($this->env, $this->extensions['Sylius\Bundle\CoreBundle\Twig\FilterExtension']->filter(twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, twig_get_attribute($this->env, $this->source, $context["child"], "imagesByType", [0 => "catalog"], "method", false, false, false, 20), "first", [], "any", false, false, false, 20), "path", [], "any", false, false, false, 20), "app_shop_taxon_catalog_mobile"), "html", null, true);
echo ");\"";
}
// line 21
echo " >
<span class=\"taxon-item-title-text\">";
// line 22
echo twig_escape_filter($this->env, twig_get_attribute($this->env, $this->source, $context["child"], "name", [], "any", false, false, false, 22), "html", null, true);
echo "</span>
</h2>
";
// line 24
if ( !twig_test_empty(twig_get_attribute($this->env, $this->source, $context["child"], "description", [], "any", false, false, false, 24))) {
// line 25
echo " <div class=\"description fw-normal mt-3\">";
echo twig_get_attribute($this->env, $this->source, $context["child"], "description", [], "any", false, false, false, 25);
echo "</div>
";
}
// line 27
echo "
";
// line 28
echo $this->env->getRuntime('Symfony\Bridge\Twig\Extension\HttpKernelRuntime')->renderFragment($this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getUrl("app_shop_products_by_label_code_and_taxon_slug", ["labelCode" => "top_all_categories", "taxonSlug" => ((twig_get_attribute($this->env, $this->source, // line 30
$context["child"], "redirect", [], "any", false, false, false, 30)) ? (twig_get_attribute($this->env, $this->source, $context["child"], "redirect", [], "any", false, false, false, 30)) : (twig_get_attribute($this->env, $this->source, $context["child"], "slug", [], "any", false, false, false, 30))), "count" => 20, "template" => "@SyliusShop/Product/Box/_top_products_slider.html.twig"]));
// line 33
echo "
</div>
</div>
";
// line 40
echo " </div>
";
++$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['child'], $context['_parent'], $context['loop']);
$context = array_intersect_key($context, $_parent) + $_parent;
$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
}
public function getTemplateName()
{
return "@SyliusShop/Taxon/_all_categories.html.twig";
}
public function isTraitable()
{
return false;
}
public function getDebugInfo()
{
return array ( 151 => 40, 145 => 33, 143 => 30, 142 => 28, 139 => 27, 133 => 25, 131 => 24, 126 => 22, 123 => 21, 117 => 20, 113 => 19, 109 => 17, 102 => 16, 90 => 12, 88 => 11, 86 => 10, 84 => 9, 82 => 8, 78 => 6, 75 => 5, 73 => 4, 63 => 3, 60 => 2, 43 => 1,);
}
public function getSourceContext()
{
return new Source("{% for child in taxon.enabledChildren %}
{% set taxonItemImage = child.imagesByType('catalog') is not empty %}
<div class=\"taxon-item row py-4{% if not loop.first %} mt-6{% endif%}{% if loop.index is even %} bg-light{% endif %}\">
{% if taxonItemImage %}
<div class=\"taxon-item-img-wrap d-none d-lg-block col-lg-6 col-xxxxl-5 col-xxxxxl-4 ps-lg-4\">
<a href=\"{{ path('sylius_shop_product_index', {'slug': child.redirect ?: child.slug, '_locale': child.translation.locale}) }}\">
{#<picture>#}
{# <source srcset=\"{{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_taxon_catalog_desktop') }}\" media=\"(min-width: 992px)\">#}
{# <source srcset=\"{{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_taxon_catalog_mobile') }}\">#}
{# <img class=\"taxon-item-img\" src=\"{{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_original') }}\" alt=\"{{ child.name }}\">#}
{#</picture>#}
<img class=\"lazy taxon-item-img\" width=\"100%\" src=\"{{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_taxon_catalog_desktop_small') }}\" data-src=\"{{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_taxon_catalog_desktop') }}\" alt=\"{{ child.name }}\">
</a>
</div>
{% endif %}
<div class=\"taxon-item-text d-flex flex-column justify-content-center col-lg-6 col-xxxxl-7 col-xxxxxl-8{% if loop.index is odd %} order-lg-first{% endif %}\">
<div class=\"taxon-item-text-content{# p-4#}\">
<h2 class=\"taxon-item-title custom-display-7 mb-0 text-center d-flex flex-column justify-content-center text-lg-start\"
onclick=\"window.location.href='{{ path('sylius_shop_product_index', {'slug': child.redirect ?: child.slug, '_locale': child.translation.locale}) }}'\"
{% if taxonItemImage %}style=\"background-image: url({{ child.imagesByType('catalog').first.path|imagine_filter('app_shop_taxon_catalog_mobile') }});\"{% endif %}
>
<span class=\"taxon-item-title-text\">{{ child.name }}</span>
</h2>
{% if child.description is not empty %}
<div class=\"description fw-normal mt-3\">{{ child.description|raw }}</div>
{% endif %}
{{ render(url('app_shop_products_by_label_code_and_taxon_slug', {
'labelCode': 'top_all_categories',
'taxonSlug': child.redirect ?: child.slug,
'count': 20,
'template': '@SyliusShop/Product/Box/_top_products_slider.html.twig'
})) }}
</div>
</div>
{# <div class=\"col-12 mt-4 text-end\">#}
{# <a class=\"btn btn-lg btn-outline-primary d-inline-flex align-items-center\" href=\"{{ path('sylius_shop_product_index', {'slug': child.slug, '_locale': child.translation.locale}) }}\">{{ 'app.ui.taxon.view'|trans }}<svg class=\"icon icon-xl bi-arrow-right-short ms-2\" viewBox=\"0 0 16 16\" xmlns=\"http://www.w3.org/2000/svg\" focusable=\"false\" aria-hidden=\"true\"><path fill-rule=\"evenodd\" d=\"M4 8a.5.5 0 0 1 .5-.5h5.793L8.146 5.354a.5.5 0 1 1 .708-.708l3 3a.5.5 0 0 1 0 .708l-3 3a.5.5 0 0 1-.708-.708L10.293 8.5H4.5A.5.5 0 0 1 4 8z\"/></svg></a>#}
{# </div>#}
</div>
{% endfor %}
", "@SyliusShop/Taxon/_all_categories.html.twig", "/var/www/sudekusa-shop-test/themes/BootstrapChildTheme/SyliusShopBundle/views/Taxon/_all_categories.html.twig");
}
}