custom/plugins/CogiThemeTulip/src/Resources/views/storefront/layout/navigation/navigation.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/layout/navigation/navigation.html.twig' %}
    
    {% block layout_main_navigation_navbar %}
        <div class="nav-container">
            {% block layout_main_navigation_menu %}
                {{ parent() }}
            {% endblock %}
        </div>
    {% endblock %}
    
    {% block layout_main_navigation_menu_item %}
        {% set custom = category.getCustomFields() %}
        {% set megamenu = custom.cogi_theme_tulip_category_use_megamenu and (treeItem.children|length > 0) %}
        {% set dropdown = not megamenu and (treeItem.children|length > 0) %}
    
        {% if megamenu or treeItem.children|length == 0 %}
            {{ parent() }}
        {% else %}
    
            <div class="nav-link main-navigation-link dropdown"
                 title="{{ name }}">
                <a class="main-navigation-link-text dropdown-toggle" data-toggle="dropdown">
                    <span itemprop="name">{{ name }}</span>
                </a>
                <div class="dropdown-menu">
                    {% if category.type != 'folder' %}
                        <a class="dropdown-item {% if categorId is same as(page.header.navigation.active.id) %}active{% endif %}"
                            href="{% if category.externalLink %}{{ category.externalLink }}{% else %}{{ seoUrl('frontend.navigation.page', { navigationId: categorId }) }}{% endif %}"
                            itemprop="url"
                            title="{{ name }}">
    
                            <strong>{{ "general.showCategory"|trans({"%category%": name})|sw_sanitize }}</strong>
                        </a>
                        <div class="dropdown-divider"></div>
                    {% endif %}
    
                    {% for childItem in treeItem.children %}
                        {% set childCategory = childItem.category %}
                        {% set childName = childCategory.translated.name %}
                        {% set childCategorId = childCategory.id %}
    
                        <a class="dropdown-item"
                            href="{% if childCategory.externalLink %}{{ childCategory.externalLink }}{% else %}{{ seoUrl('frontend.navigation.page', { navigationId: childCategorId }) }}{% endif %}">
    
                            {{ childName }}
                        </a>
                    {% endfor %}
                </div>
            </div>
    
        {% endif %}
    {% endblock %}
    
    {% block layout_main_navigation_menu_items %}
        {{ parent() }}
    
        <div id="tulip-navigation-overflow-items" class="tulip-navigation-overflow-items nav-link main-navigation-link dropdown" style="display:none;">
            <a class="main-navigation-link-text dropdown-toggle" data-toggle="dropdown">
                <span itemprop="name">{{ "cogi.theme.tulip.navigation.overflowItems"|trans }}</span>
            </a>
            <div class="dropdown-menu">
    
            </div>
        </div>
    {% endblock %}
    
    {% block layout_main_navigation_menu_flyout %}
        {% set custom = treeItem.category.getCustomFields() %}
        {% set megamenu = custom.cogi_theme_tulip_category_use_megamenu %}
    
        {% if megamenu %}
            <div class="navigation-flyout"
                 data-flyout-menu-id="{{ treeItem.category.id }}">
                <div class="container">
                    {% block layout_main_navigation_menu_flyout_include %}
                        {% sw_include '@Storefront/storefront/layout/navigation/flyout.html.twig' with {navigationTree: treeItem, level: level+1} only %}
                    {% endblock %}
                </div>
            </div>
        {% endif %}
    {% endblock %}
    
    {% block layout_main_navigation_menu_home %}
        {% if not config('CogiThemeTulip.config.hideNavigationHome') %}
            {{ parent() }}
        {% endif %}
    {% endblock %}