templates/shop/menu/index.html.twig line 1

  1. <div class="col-12 col-lg-3 p-lg-unset">
        <div class="row">
            <div class="col-12 p-lg-unset">
                <div class="categories-list-toggle">
                    <div class="categories-list-toggle__icon">
                        <span></span>
                        <span></span>
                        <span></span>
                    </div>
                    <div class="categories-list-toggle__heading">{% trans %}kategorie.publikaci{% endtrans %}</div>
                </div>
                <ul class="categories-list">
                    {% for category in categories %}
                        {% set hasSubCategories = false %}
                        {% for subCategory in category.categoryCategories %}
                            {% if subCategory.categorySub.isActive == 1 %}
                                {% set hasSubCategories = true %}
                            {% endif %}
                        {% endfor %}
                        <li class="categories-list__item  {% if hasSubCategories %} categories-list__item--submenu {% endif %}">
                            <a href="{{ path('shop_category_detail', {slug: category.slug}) }}" class="categories-list__link {% if hasSubCategories %} categories-list__link--submenu  {% endif %}">
                                {% if category.menuName %}
                                    {{ category.menuName }}
                                {% else %}
                                    {{ category.name }}
                                {% endif %}
                            </a>
                            {% if hasSubCategories %}
                                <button class="categories-list__submenu-btn" type="button">
                                    <img src="{{ asset('build/svg/link-arrow.svg') }}" alt="Arrow">
                                </button>
                                <ul class="subcategories-list">
                                    {% for subCategory in category.categoryCategories %}
                                        {% if subCategory.categorySub.isActive == 1 %}
                                            <li class="subcategories-list__item">
                                                <a href="{{ path('shop_category_detail', {slug: subCategory.categorySub.slug}) }}" class="subcategories-list__link">
                                                    {% if subCategory.categorySub.menuName %}
                                                        {{ subCategory.categorySub.menuName }}
                                                    {% else %}
                                                        {{ subCategory.categorySub.name }}
                                                    {% endif %}
                                                </a>
                                            </li>
                                        {% endif %}
                                    {% endfor %}
                                </ul>
                            {% endif %}
                        </li>
                    {% endfor %}
                </ul>
                <ul class="links-box links-box--sm-inline">
                    {% if is_granted('IS_AUTHENTICATED_FULLY') %}
                        <li class="links-box__item">
                            <a href=" {{ path('app_shop_profile_orders') }} " class="links-box__link links-box__link--w-icon">
                                <img src="{{ asset("build/svg/user.svg") }}" alt="user" class="links-box__link-icon">
                                {% trans %}muj-profil{% endtrans %}
                            </a>
                        </li>
                        <li class="links-box__item">
                            <a href="{{ path('shop_logout') }}" class="links-box__link links-box__link--w-icon">
                                <img src="{{ asset("build/svg/user.svg") }}" alt="user" class="links-box__link-icon">
                                {% trans %}odhlasit.se{% endtrans %}
                            </a>
                        </li>
                    {% else %}
                        <li class="links-box__item">
                            <a href="javascript:void(0)" class="links-box__link links-box__link--w-icon js-modal-trigger" data-modal="login">
                                <img src="{{ asset("build/svg/user.svg") }}" alt="user" class="links-box__link-icon">
                                {% trans %}prihlasit.se{% endtrans %}
                            </a>
                        </li>
                        <li class="links-box__item">
                            <a href="{{ path('shop_register') }}" class="links-box__link links-box__link--w-icon">
                                <img src="{{ asset("build/svg/user.svg") }}" alt="user" class="links-box__link-icon">
                                {% trans %}registrovat.se{% endtrans %}
                            </a>
                        </li>
                    {% endif %}
                    <li class="links-box__item">
                        <a href="/{{ app.request.locale }}/vse-o-nakupu" class="links-box__link links-box__link--w-icon">
                            <img src="{{ asset("build/svg/info.svg") }}" alt="info" class="links-box__link-icon">
                            {% trans %}vseo.nakupu{% endtrans %}
                        </a>
                    </li>
                </ul>
            </div>
        </div>
    </div>