I want to add more Collections to a section. Right now the maximum number of collections I can add is 8. How can I increase this to add more Collections to one section instead of adding a new section?
yes, please share that section code so i will check and update you
I’m sorry, but I have no idea how to do that. How do I share the section code?
Hi @EmMu You can go to the theme editor and in the sections folder, there should be a file named something like collections-list.liquid or list-collections. you can share the code from that file
{%- liquid
assign show_sort = section.settings.enable_sort
assign filter_layout = section.settings.filter_layout
assign show_group_filters = false
if filter_layout == ‘inline-open’
assign show_group_filters = true
endif
comment
The product limit decrement will be removed once we add more block types
endcomment
assign product_limit = section.settings.product_limit
assign blocks_featured_image = section.blocks | where: “type”, “featured_image”
if blocks_featured_image.size > 0
assign product_limit = product_limit | minus: 1
endif
assign section_blocks_filter_group = section.blocks | where: “type”, “group”
assign show_group_filter = false
assign show_filter = false
if section.settings.enable_filters and section_blocks_filter_group.size > 0
assign show_group_filter = true
elsif section.settings.enable_filters
assign show_filter = true
endif
assign columns_desktop = section.settings.grid | plus: 0
assign columns_mobile = section.settings.grid_mobile | plus: 0
assign columns_tablet = 3
assign columns_small = 2
assign grid_gap = settings.gap_size | append: ‘px’
case columns_desktop
when 1
assign columns_tablet = 1
assign columns_small = 1
when 2
assign columns_tablet = 2
assign columns_small = 2
endcase
assign animation_anchor = ‘.collection-’ | append: collection.handle
assign animation_duration = 800
-%}
{%- style -%}
#Collection–{{ section.id }} {
–PT: {{ section.settings.padding_top }}px;
–PB: {{ section.settings.padding_bottom }}px;
–grid: repeat({{ columns_desktop }}, minmax(0, 1fr));
–grid-tablet: repeat({{ columns_tablet }}, minmax(0, 1fr));
–grid-small: repeat({{ columns_small }}, minmax(0, 1fr));
–grid-mobile: repeat({{ columns_mobile }}, minmax(0, 1fr));
}
{%- endstyle -%}
{%- capture collection_sidebar_class -%}
{%- if filter_layout == ‘slide-out’ -%}
collection__sidebar__slide-out
{%- else -%}
collection__sidebar__slider{% if show_group_filters %} expanding expanded no-mobile-animation{% endif %}
{%- endif -%}
{%- endcapture -%}
{%- paginate collection.products by product_limit -%}
{%- assign align_classes = ‘’ -%}
{%- if show_sort -%}
{%- assign align_classes = align_classes | append: ’ collection__nav–sort ’ -%}
{%- endif -%}
{%- if show_filter or show_group_filter -%}
{% assign align_classes = align_classes | append: ’ collection__nav–filter ’ %}
{%- endif -%}
{%- if show_sort or show_filter or show_group_filter -%}
{%- if show_filter or show_group_filter -%}{%- if filter_layout == ‘slide-out’ -%}
{{ ‘collections.general.filters’ | t }}
{%- else -%}
{{ ‘collections.general.filters’ | t }}
{{ ‘collections.general.close_filters’ | t }}
{%- endif -%}
{%- assign filter_active_count = 0 -%}
{%- if show_filter -%}
{%- for filter in collection.filters -%}
{%- assign filter_active_count = filter_active_count | plus: filter.active_values.size -%}
{%- endfor -%}
{%- endif -%}
{%- if show_group_filter and current_tags.size > 0 -%}
{%- assign filter_active_count = current_tags.size -%}
{%- endif -%}
{{- filter_active_count -}}
{%- render ‘icon-nav-arrow-down’ -%}
{%- if show_sort -%}
{% render ‘collection-sorting’ %}
{%- endif -%}
{%- if show_filter -%}
{%- render ‘collection-filters-sidebar’, section: section -%}
{%- endif -%}
{%- if show_group_filter -%}
{%- render ‘collection-tags-grouped’, collection: collection, show_filters: show_group_filters, filter_layout: filter_layout -%}
{%- endif -%}
{%- if filter_layout == ‘slide-out’ -%}
{%- endif -%}
{%- style -%}
product-item–{{ block.id }} .product-item__image-overlay {
{%- unless featured_color_text == ‘rgba(0,0,0,0)’ or featured_color_text == blank -%}
color: {{ featured_color_text }};
{%- endunless -%}
}
product-item–{{ block.id }} .product-item__image-overlay::before { opacity: {{ featured_overlay_opacity }}; background-color: {{ featured_color_overlay }}; }
product-item–{{ block.id }} .product-item__image-content .btn:hover { color: {{ featured_color_overlay }}; background-color: {{ featured_color_text }}; border-color: {{ featured_color_text }}; }
{%- endstyle -%}
{{ featured_header }}
{%- endif -%}{%- if featured_text != blank -%}
{{ featured_text }}
{%- endif -%}
{%- if featured_button_text != blank -%}
{{- featured_button_text -}}
{%- if settings.show_arrow -%}
{%- render ‘icon-arrow-right’ -%}
{%- endif -%}
{%- endif -%}
{% if featured_button_text == blank and featured_button_link != blank %}
{% endif %}
{%- unless featured_image == blank -%}
{{ featured_image_content }}
{{ featured_image_content }}
{%- if collection.products.size > 0 -%}
{%- for product in collection.products -%}
{%- assign grid_int = section.settings.grid | times: 1 -%}
{%- assign animation_delay = forloop.index0 | modulo: grid_int | times: 1 -%}
{%- render ‘product-grid-item’, product: product, animation_delay: animation_delay, index: forloop.index -%}
{%- endfor -%}
{%- else -%}
{{ 'collections.general.no_matches' | t }}
{%- assign sort_by_string = '' -%} {%- if collection.sort_by != blank -%} {%- assign sort_by_string = '?sort_by=' | append: collection.sort_by -%} {%- endif -%} {{ 'collections.general.reset' | t }}{%- render ‘pagination’, paginate: paginate -%}
{% schema %}
{
“name”: “Collection products”,
“templates”: [“collection”],
“settings”: [
{
“type”: “checkbox”,
“id”: “enable_sort”,
“label”: “Show sorting”,
“default”: true
},
{
“type”: “checkbox”,
“id”: “enable_filters”,
“label”: “Enable filters”,
“default”: true
},
{
“type”: “select”,
“id”: “filter_layout”,
“label”: “Filter layout”,
“default”: “inline-open”,
“options”: [
{ “label”: “Slide out”, “value”: “slide-out” },
{ “label”: “Inline (closed)”, “value”: “inline-closed” },
{ “label”: “Inline (open)”, “value”: “inline-open” }
]
},
{
“type”: “link_list”,
“id”: “collection_linklist”,
“label”: “Sidebar navigation”,
“info”: “This menu won’t show dropdown items.”
},
{
“type”: “header”,
“content”: “Product grid”
},
{
“type”: “range”,
“id”: “grid”,
“label”: “Products per row on desktop”,
“min”: 2,
“max”: 6,
“step”: 1,
“default”: 4
},
{
“type”: “radio”,
“id”: “grid_mobile”,
“label”: “Products per row on mobile”,
“options”: [
{
“value”: “1”,
“label”: “One”
},
{
“value”: “2”,
“label”: “Two”
}
],
“default”: “2”
},
{
“type”: “range”,
“id”: “product_limit”,
“min”: 1,
“max”: 50,
“step”: 1,
“label”: “Products per page”,
“default”: 36
},
{
“type”: “header”,
“content”: “Section padding”
},
{
“type”: “range”,
“id”: “padding_top”,
“min”: 0,
“max”: 100,
“step”: 1,
“unit”: “px”,
“label”: “Padding top”,
“default”: 0
},
{
“type”: “range”,
“id”: “padding_bottom”,
“min”: 0,
“max”: 100,
“step”: 1,
“unit”: “px”,
“label”: “Padding bottom”,
“default”: 0
}
],
“blocks”: [
{
“type”: “featured_image”,
“limit”: 1,
“name”: “Featured image”,
“settings”: [
{
“type”: “image_picker”,
“id”: “featured_image”,
“label”: “Image”
},
{
“type”: “select”,
“id”: “featured_image_bg_position”,
“label”: “Position”,
“default”: “center-center”,
“options”: [
{ “label”: “Top”, “value”: “center-top” },
{ “label”: “Right”, “value”: “right-center” },
{ “label”: “Center”, “value”: “center-center” },
{ “label”: “Left”, “value”: “left-center” },
{ “label”: “Bottom”, “value”: “center-bottom” }
]
},
{
“type”: “text”,
“id”: “featured_heading”,
“label”: “Heading”,
“default”:“Featured link”
},
{
“type”: “richtext”,
“id”: “featured_text”,
“label”: “Text”,
“default”:“
Promote products or collections
”
},
{
“type”: “text”,
“id”: “featured_button_text”,
“label”: “Button label”,
“default”:“Learn more”
},
{
“type”: “url”,
“id”: “featured_button_link”,
“label”: “Button link”
},
{
“type”: “color”,
“id”: “featured_color_text”,
“label”: “Text”,
“default”: “#ffffff”
},
{
“type”: “color”,
“id”: “featured_color_overlay”,
“label”: “Overlay”,
“default”: “#222222”
},
{
“type”: “range”,
“id”: “featured_overlay_opacity”,
“label”: “Overlay opacity”,
“step”: 5,
“max”: 100,
“min”: 0,
“unit”: “%”,
“default”: 10
}
]
},
{
“type”: “group”,
“name”: “Legacy: Tag group”,
“settings”: [
{
“type”: “header”,
“content”: “Legacy feature: tag grouping”
},
{
“type”: “paragraph”,
“content”: “This is a legacy feature that is intended to help merchants with large catalogs transition to OS2.0. Filtering by tag will be removed from Broadcast when 0S2.0 filters can fully replace their functionality. This method of tag-based product filtering cannot be combined with OS2.0 filters.”
},
{
“type”: “text”,
“id”: “title”,
“label”: “Group name”,
“default”: “Filter by size”
},
{
“type”: “text”,
“id”: “group_tags”,
“label”: “Tag list”,
“default”: “Small, Medium, Large”,
“info”: “Comma separated group of tags”
}
]
}
]
}
{% endschema %}