templates/web/submenu/product.html.twig line 1

  1. <div class="submenu submenu--products">
        <button type="button" class="submenu__close">
            <svg>            
                <use href="{{ asset('build/svg/_icons.svg#close') }}"></use>
            </svg>
        </button>
        <div class="container">
            {% for category in categories %}
                <div class="submenu-inner">
                    <h2 class="submenu__title">{{ category.menuName ?: category.name }}</h2>
                    {% set subCategories = find_sub_menu_categories(category, menuType) %}
                    {% if subCategories|length > 0 %}
                        <ul class="submenu-catalogue submenu-catalogue--fluid mt-4">
                            {% for subCategory in subCategories %}
                                <li class="submenu-catalogue__item submenu-catalogue-category">
                                    {% if subCategory.upload and subCategory.upload.path %}
                                        {% set subCategoryImagepath = sized_image(subCategory.upload, "_sm") %}
                                        <div class="submenu-catalogue-category__image--wrapper">
                                            <img class="submenu-catalogue-category__image" src="{{ subCategoryImagepath }}" alt="{{ category.name }}">
                                        </div>
                                    {% else %}
                                        <div class="submenu-catalogue-category__image--wrapper">
                                            <img class="submenu-catalogue-category__image" src="/build/img/catalogue-category1.jpg" alt="{{ category.name }}">
                                        </div>
                                    {% endif %}
    
    
                                    {% if subCategory.categoryType is defined and subCategory.categoryType.slugPrefix is defined and subCategory.categoryType.slugPrefix != '' %}
                                        {% set subCategoryPath = path(subCategory.categoryType.controllerName, {slug: subCategory.slug, slug_prefix: subCategory.categoryType.slugPrefix}) %}
                                    {% else %}
                                        {% set subCategoryPath = path(subCategory.categoryType.controllerName, {slug: subCategory.slug}) %}
                                    {% endif %}
    
                                    <a href="{{ subCategoryPath }}" class="submenu-catalogue-subcategories__link">
                                        {{ subCategory.menuName ?: subCategory.name }}
                                    </a>
                                    {% for label in subCategory.labels %}
                                        {% if label.name == "Akce - osvětlení" %}
                                            
                                        {% endif %}
                                    {% endfor %}
                                </li>
    
                            {% endfor %}
                        </ul>
                    {% endif %}
                </div>
            {% endfor %}
        </div>
    </div>