{% set related = related|default %}
{% set application = application|default %}
{% set productsBtn = productsBtn|default %}
<div class="position-relative">
{% set hideProdNavs = (products|length <= 4) %}
{% include "front/slid-nav.html.twig" with {"hide":hideProdNavs} %}
<div class="kvvbun max--5">
{% for key, product in products %}
{% if related %}
{% set product = product.targetProduct %}
{% set productSubCategory = getSubCategory(product) %}
{% include "front/productDetail.html.twig" with {'subtitle':true, "subtitleVal":(productSubCategory ? productSubCategory.title : null), "intro":product.intro} %}
{% elseif application %}
{% if product.product %}
{% set product = product.product %}
{% set productSubCategory = getSubCategory(product) %}
{% include "front/productDetail.html.twig" with {'subtitle':true, "subtitleVal":(productSubCategory ? productSubCategory.title : null), "intro":product.intro} %}
{% else %}
{% set category = product.category ?? product.subCategory ?? product.subSubCategory %}
{% include "front/categoryDetail.html.twig" with {'subtitle':true, "subtitleVal":(category ? category.title : null), "intro":(product.description ?? null)} %}
{% endif %}
{% else %}
{% set productSubCategory = getSubCategory(product) %}
{% include "front/productDetail.html.twig" with {'subtitle':true, "subtitleVal":(productSubCategory ? productSubCategory.title : null), "intro":product.intro} %}
{% endif %}
{% endfor %}
</div>
{% include "front/slid-nav.html.twig" with {'isRight':1, "hide":hideProdNavs} %}
</div>
{% if productsBtn %}
<div class="mat-30">
<a href="{{ path('front_products') }}" class="btn btn2">
<i class="fa fa-arrow-right mar-5"></i>
{{ "prod_slick.btn"|trans|raw }}
</a>
</div>
{% endif %}