View all subcollection button impulse theme

Topic summary

A Shopify store owner using the Impulse theme wants to modify how subcollections display on mobile devices. Currently, all subcollections appear before products when viewing the main collection.

Desired functionality:

  • Show only 2 subcollections initially on mobile view
  • Add a “View All” or “Show More” button below these 2 subcollections
  • Clicking the button reveals remaining subcollections on the same page

Current situation:

  • The store already displays subcollections within the main collection page
  • Code for sub-collections.liquid was shared (though appears corrupted in the thread)

Proposed solutions:

  • One suggestion: Convert subcollections to a slider format on mobile instead of a show/more button, as this would be simpler to implement
  • Alternative: Implement the requested show/more button functionality, which requires custom JavaScript
  • Resources mentioned: YouTube tutorial for slider implementation, or using AI tools (ChatGPT/Gemini) to generate the necessary code

Technical requirement: Custom JavaScript will be needed to achieve the show/more button functionality. The discussion remains open with the store owner preferring the button approach over the slider alternative.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

i have a collection and there are subcollections in it when we open the main collection it first show all the sub collections and then products. I want only 2 sub-collections in the mobile view and after that, I want to add a button to view all sub-collections

when a person click on the button the remaining collections will be visible on the same page,

here is the URL of my website
https://dazzlebysarah.com/collections/khussa-shoes-online

here is the code of the sub-collections.liquid

{%- liquid
case per_row
when 2
assign grid_item_width = ‘medium-up–one-half’
when 3
assign grid_item_width = ‘small–one-half medium-up–one-third’
when 4
assign grid_item_width = ‘small–one-half medium-up–one-quarter’
when 5
assign grid_item_width = ‘small–one-half medium-up–one-fifth’
endcase
-%}

{%- for sub_collection_link in sub_collection_links -%} {%- if sub_collection_link.url contains '/collections/' -%} {%- liquid assign lang_code_string = request.locale.iso_code | prepend: '/' | downcase assign sub_collection_handle = sub_collection_link.url | remove: '/collections/' | remove: lang_code_string assign sub_collection = collections[sub_collection_handle] -%} {%- if sub_collection != blank -%} {%- unless parent_url == sub_collection.url -%} {%- render 'collection-grid-item', collection: sub_collection, grid_item_width: grid_item_width, collection_title: sub_collection_link.title per_row: per_row -%} {%- endunless -%} {%- endif -%} {%- endif -%} {%- endfor -%}

hey there @dazzlebysarah

By your description are you looking for something like this. If yes you can create a section and add those logic by the help of metafields and metaobject

yes but I want to show only 2 subcollections in the mobile view and for the remaining collection I want to add a button, the purpose is, when someone click on the button all the other sub-collections will appear beneath the first 2 collections

Hmm Something more like Read more button to reveal the rest subcollection later, wouldn’t it fine if in mobile view it convert as slider something like this

because that showmore button thingy requires script and all that it will be time consuming for you.

But if you still want that I can make it happen as for the slider one I have a youtube video suggestion not my video watch this

If you are unable to implement the same then I’m happy to do this for you, let me know. I can implement the code changes so that this will work well for you.

Hopefully, it will help you. If yes then Please don’t forget to hit Like and Mark it as the solution!

i already have my sub collection in the main collection.

the thing I want to do is to show only 2 collection in the mobile view and after these 2 sub collection I want to add a button. when you click a button remain collection will become visible

You will be needing js script to make that possible you can take the help of tools like chatgpt and Gemini to make one or hire a developer