<h3 class="side-heading">{{ 'coreshop.ui.categories'|trans }}</h3>
{% if categories %}
<div class="list-group categories">
    {% for category in categories %}
        {% set active = activeCategory is defined and activeCategory and activeCategory.id == category.id %}
        <a href="{{ pimcore_object_path(category) }}" class="{% if active %} active {% endif %} list-group-item"     {{  coreshop_test_html_attribute('category-menu-left',category.name) }} >
            <i class="fa fa-chevron-right"></i>
            {{ category.name }}

        </a>
        {% if active and activeSubCategories|length > 0 %}
            <div class="list-group categories">
                {% for subCategory in activeSubCategories %}
                    {% set active = activeCategory is defined and activeCategory and activeCategory.id == subCategory.id %}
                    <a href="{{ pimcore_object_path(subCategory) }}" class="{% if active %} active {% endif %} list-group-item">
                        <i class="fa fa-chevron-right"></i>
                        {{ subCategory.name }}
                        {{  coreshop_test_html_attribute('category-menu-left',category.name) }}
                    </a>
                {% endfor %}
            </div>
        {% endif %}
    {% endfor %}
</div>
{% endif %}
