Minimal theme collection list limit to 5 blocks

Solved
Highlighted
New Member
4 0 0

Guys,

I am new and need to add a collection list of vendors in the main page , but the theme limit to 5 blocks. Need advise?

0 Likes
Highlighted
Shopify Expert
3897 559 935

This is an accepted solution.

Hi @benng 

Follow this:

1. Section->collection-list.liquid -> find "max_blocks" and change it as you want from "5".

 

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
4 0 0
Thanks a lot!
0 Likes
Highlighted
New Member
4 0 0

When I changed the code, the collection list crashed and displayed blank grids.


@benng wrote:
Thanks a lot!

 

0 Likes
Highlighted
Shopify Expert
3897 559 935

Jus t change 5 to "your number", don't change anything else 

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
New Member
2 0 0

I have the same problem. If I change it to 6 collections by changing the value to 6, the theme gets crashed and all collections are shown as big empty squares all over the theme. Is there any solution to this?

0 Likes
Highlighted
Shopify Expert
3897 559 935

This is an accepted solution.

If you change it to just any number then it will increase your block in them editor,i don't think it will crash your store.

if so then need to check i code cant say direct. 

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes
Highlighted
Tourist
5 0 4

To correct have this behaviour, you need to:

1. Open collection-list.liquid

2. Look for {% when 5 %} at line 23, and change it to {% else %}, so it should look like this after you amend it

 

  <div class="grid-uniform">
    {% case section.blocks.size %}
      {% when 1 %}
        {%- assign collection_item_width = 'one-half' -%}
        {%- assign collection_width = 625 -%}
      {% when 2 %}
        {%- assign collection_item_width = 'one-half' -%}
        {%- assign collection_width = 625 -%}
      {% when 3 %}
        {%- assign collection_item_width = 'medium-down--one-half one-third' -%}
        {%- assign collection_width = 410 -%}
      {% when 4 %}
        {%- assign collection_item_width = 'medium-down--one-half one-quarter' -%}
        {%- assign collection_width = 330 -%}
      {% else %}
        {%- assign collection_item_width = 'small--one-half medium--one-third post-large--one-fifth' -%}
        {%- assign collection_width = 235 -%}
    {% endcase %}​

 

3. Scroll down to Line 62 or around there, and look for "max_blocks", change it to 10 or some other figures

4. Hit Save! And voila, it should be working nicely. Give it a try!

0 Likes
Highlighted
Tourist
8 1 0

I would like to know if theres a way to have it in two rows cause rn i have 5 in the first and 1 in the second and i want it to be 3 per rows thx

Discraft__0-1603553771087.png

 

 

0 Likes
Highlighted
Shopify Expert
3897 559 935

Send your store url 

Want to modify or custom changes on store hire me.
Want to give Gift for time? its my Paypal too.
If helpful then please Like and Accept Solution.
Email: jasoliyabrijesh123@gmail.com Or WhatsApp
Skype: jasoliya.brijesh
Want to get Free review and advice for sale on store ?? just text me here
0 Likes