{% extends '/web/base.html.twig' %}
{% block description %}{{ category.description }}{% endblock %}
{% block body %}
<section class="mt-0">
<div class="container">
{% block breadcrumbs %}
{{ render(path('fragment_category_breadcrumbs', {'category' : category.id})) }}
{% endblock %}
<h1>{{ category.name|raw }}</h1>
{{ categoryContent|raw }}
{% block subCategories %}
{% if sub_categories is defined and sub_categories|length > 0 %}
{{ include('/shop/category/_sub_category_tiles.html.twig', {sub_categories: sub_categories, aside_categories: []}) }}
{% endif %}
{% endblock %}
{% block products %}
{# {% if products|length < 1 and sub_categories is defined and sub_categories|length > 0 %}#}
{# {% set products = find_category_products(category) %}#}
{# {% endif %}#}
{% if products|length > 0 %}
{{ include('/shop/product/_product_tiles.html.twig', {products: products}) }}
{% endif %}
{% endblock %}
{% block cta %}
{% set files = get_category_related_files(category) %}
<div class="help-box mt-6">
<div class="help-box__text">
<h2 class="help-box__heading h4">{% trans %}Potřebujete pomoci s výběrem?{% endtrans %}</h2>
</div>
<div class="help-box__buttons">
<a href="/kontakt" class="button button--primary">{% trans %}Kontaktujte našeho obchodníka{% endtrans %}</a>
{% if files %}
{% for file in files %}
<a href="{{ file.path }}" target="_blank" class="button button--tertialy">
<svg>
<use href="/build/svg/_icons.svg#file"></use>
</svg>
{{ file.name}}
({{ file.extension|upper }})</a>
{% endfor %}
{% endif %}
</div>
</div>
{% endblock %}
{% set benefitSections = get_information_blocks(category,1,6) %}
{% if benefitSections|length > 0 %}
{% for benefitSection in benefitSections %}
{{ benefitSection.text|raw }}
{% endfor %}
{% endif %}
{% block installationOptions %}
{% set placementSections = get_information_blocks(category,1,7) %}
{% if placementSections|length > 0 %}
{% for placementSection in placementSections %}
{{ placementSection.text|raw }}
{% endfor %}
{% endif %}
{% endblock %}
{% block faq %}
{% set faqs = get_information_blocks(category,1,2) %}
{% if faqs|length > 0 %}
<section>
<div class="container">
<h2>{% trans %}Často kladené otázky klientů{% endtrans %}</h2>
{% for faq in faqs %}
<details class="accordion {% if loop.first %}mt-big{% endif %}">
<summary class="accordion__summary">
<h3>{{ faq.title }}</h3>
</summary>
<div class="accordion__content">
{{ faq.text|raw }}
</div>
</details>
{% endfor %}
</div>
</section>
{% endif %}
{% endblock %}
{% set otherProductTypeSections = get_information_blocks(category,1,8) %}
{% if otherProductTypeSections|length > 0 %}
{% for otherProductTypeSection in otherProductTypeSections %}
{{ otherProductTypeSection.text|raw }}
{% endfor %}
{% endif %}
{% block inspiration %}
{% set otherCategoryTypeSections = get_information_blocks(category,1,9) %}
{% if otherCategoryTypeSections|length > 0 %}
{% for otherCategoryTypeSection in otherCategoryTypeSections %}
{{ otherCategoryTypeSection.text|raw }}
{% endfor %}
{% endif %}
{% endblock %}
</div>
</section>
{% endblock %}