Menu Close

Get Support From ShopWired Close

All systems fully operational

Subscribe To Updates
Prefer To Live Chat? Chat directly with ShopWired support Available from 9.00am to 6.00pm Monday to Friday Quickest response time
Send A Message
Response within 24 hours

Menu Close

Menu

category_menu partial

The category_menu.twig partial hosts the sidebar menu of your theme. This is usually shown on the category pages of your website (or brand pages) to easily allow users to view the products belonging to another category or subcategory (or brand).

It is referenced from the category/brand views.


The view will display a menu of the categories and subcategories using the global.categories object.

<h3>Shop by category</h3>
<ul>
    {% for category in categories|default(global.categories) %}
        {% if category.categories %}
            <li class="dropdown">
                <a href="{{ category.url }}">
                    {{ category.title }}
                </a>
                <ul role="menu">
                    {% for subcategory in category.categories %}
                        <li>
                            <a href="{{ subcategory.url }}">{{ subcategory.title }}</a>
                        </li>
                    {% endfor %}
                </ul>
            </li>
        {% else %}
            <li>
                <a href="{{ category.url }}">{{ category.title }}</a>
            </li>
        {% endif %}
    {% endfor %}
</ul>