Can someone convert it into for featured collection section?
{%- if section.settings.slider_visual == 'counter' -%}
1
/
{{ 'general.slider.of' | t }}
{{ section.blocks.size }}
{%- else -%}
{%- for block in section.blocks -%}
{%- if section.settings.slider_visual == 'numbers' -%}
{{ forloop.index -}}
{%- else -%}
{%- endif -%}
{%- endfor -%}
{%- endif -%}
{
“type”: “select”,
“id”: “slider_visual”,
“options”: [
{
“value”: “dots”,
“label”: “t:sections.slideshow.settings.slider_visual.options__2.label”
},
{
“value”: “counter”,
“label”: “t:sections.slideshow.settings.slider_visual.options__1.label”
},
{
“value”: “numbers”,
“label”: “t:sections.slideshow.settings.slider_visual.options__3.label”
}
],
“default”: “counter”,
“label”: “t:sections.slideshow.settings.slider_visual.label”
},
Hello @saeed_devstarx ,
This is the right form for the code to make the pagination for the Featured Collection section in your Shopify store the same as the Slideshow section
{%- if section.settings.slider_visual == 'counter' -%}
1
/
{{ 'general.slider.of' | t }}
{{ collection.products_count }}
{%- else -%}
{%- for product in collection.products -%}
{%- endfor -%}
{%- endif -%}
Hope this can help.
OneCommerce team.
To make the same pagination for the featured collection section as in the slideshow section, you can follow these steps:
- Open the HTML file where you want to add the pagination.
- Locate the section where the slideshow pagination code is placed.
- Copy the pagination code from the slideshow section.
- Paste the pagination code into the featured collection section at the appropriate location.
- Modify the code as necessary to reflect the correct class or ID for the featured collection section.
- Save the changes to the HTML file.
- Test the pagination to ensure that it is working correctly for the featured collection section.
It is not working for me.