Displaying multiple subcategories in Collection template

pixellabpixellab Member Posts: 1


I am trying to display all categories from multiple levels (3 levels total), but for some reason I can only get 2 levels of categories to display.

I have a hierarchy that is in the form: Parent>Child>Grandchild

In my `collection.rain` file, the Parent and Child categories display correctly, but I am unable to get the grandchild to show.

Can someone please help me with the code? What I have is the following:

{% for category in shop.categories %}
    <li>{{ category.title }}
    {% if category is active and category.subs %}
        {% for subcategory in category.subs %}
            <li>{{ subcategory.title }}</li>
            {# WHAT DO I PUT HERE TO SHOW THE 3rd CATEGORY? #}
        {% endfor %}
    {% endif %}
{% endfor %}

1 comment

Sign In or Register to comment.