Need to create a tagfilter system

Highlighted
New Member
8 0 0

Right now how the sidebar menu works on the collection page is not what I am looking for.

 

This is what it looks like: https://i.gyazo.com/eceb6fecc96b5d7d754a3d6d5b674a99.png

 

The problem with this is that it shows all types of every collection and not only the type of products which are available within certain collections. (Also the color filter doesnt work like intended but thats a problem for later)

I tried so many things but don't get it to work.

 

<ul id="faq">
                {% assign category_list_limit =
                settings.category_list_limit_handle %} {% for category in
                collections limit: category_list_limit %}
                <li
                    class="{% if collection and collection.handle == category.handle %}active{% endif %}"
                >
                    <a
                        data-toggle="collapse"
                        data-parent="#faq"
                        href="#shop-catigory-{{ category.title | handle }}"
                        >{{ category.title }} <i class="ion-ios-arrow-down"></i
                    ></a>
                    <ul
                        id="shop-catigory-{{ category.title | handle }}"
                        class="panel-collapse collapse {% if forloop.first == true %}show{% endif %}"
                    >
                        {% assign product_type_limit = 30
                        %} {% for type in shop.types limit:
                        product_limit %} {% if type != '' %}
                        <li
                    class="{% if collection.current_type == type %}active{% endif %}"
                >
                    <a href="{{ type | url_for_type }}">{{ type }}</a>
                          {% endif %}
                        {% endfor %}
                    </ul>
                </li>
                {% endfor %}
            </ul>

 

What I expect it to do is that the side menu shows the 4 collection names and underneath the list of types of products within that collection.

 

Maybe an easier solution would be if it only shows 1 collection name and al the producttypes are listed below that. That would be ok for me as well. But If I click on the name of a producttype I should still be seeing the whole list.

 

 

Thanks in advance!

0 Likes
New Member
8 0 0

No one?

0 Likes