Expanse theme - removing (16/16) collections limit in a Collection List

Gladiatorjonas
Excursionist
12 0 4

I have recently bought the Expanse theme for my workplace and have now run into an issue. It's very clever that you can output various collections on a given page directly via the customizer - but there is a limit of how many collections you can output- 16. I would love to remove this cap to post unlimited collections - or say 50 might be enough - but can't find the snippet to do so. Can anyone help? We are a publishing house, and I would like to use collections to display our writers alphabetically. 

Regards - and good karma to you if you solve the puzzle. I have an idea of where the code might be, but too unexperienced to just go ahead and play with the code.

expanse collection limit 16.JPG

Replies 10 (10)
PaulNewton
Shopify Partner
3512 235 688

@Gladiatorjonas wrote:

So for everyone dealing with this issue. I found a workaround. What you can do is to put the desired collections into a menu and calling that menu via. liquid through the "Custom content" HTML section - also pulling the image from every collection. This will display exactly like the previous mentioned blocks and you can output whatever you have in the menu - no 16 items limit. Hope it makes sense. Just replace "yourlink" with your desired menu.


Good work, You can mark your own solution as the solution so future users see a nice fat checkmark in the search

N.B. You can also access collections directly https://shopify.dev/api/liquid/objects/#collections i.e. collections.frontpage.products

Advanced use accessor [] syntax to use strings to get the needed collection , psuedocode:

 

{%- assign collection_handles = "collection-handle-1,collection-handle-2,collection-handle-3" | split:"," -%}
{%- for collection_handle in collection_handles -%}
 {%- comment -%} "this_collection" instead of "collection" or "current_collection" to avoid oddities{%- endcomment -%}
 {% assign this_collection = collections[collection_handle].products %}
  {{- this_collection.title -}} 
{%- endfor -%}

 

For deeper integration there is a setting type to let you select a linklist|menu in the theme settings themself https://shopify.dev/themes/architecture/settings/input-settings#link_list useful if you need to consistently setup sections for this feature instead of having to manually hard code a new menu name each time..

 

What important thing did you learn this Black Friday?


Answers powered by coffee Buy Paul a ☕ Coffee for more answers or donate to eff.org

Problem Solved? ✔Accept and Like solutions to help future merchants

Confused? Busy? Buy a custom solution paull.newton+shopifyforum@gmail.com