Discuss and resolve questions on Liquid, JavaScript, themes, sales channels, and site speed enhancements.
Hi, Is there a simple way to change these two "View All" Button to 2 different custom link?
First Button of "View All"
from palettepaws.com/collections
to palettepaws.com/pages/exampleONE
Second Button "View All"
from palettepaws.com/collections
to palettepaws.com/pages/exampleTWO
I'm new to Shopify and currently using the Dawn Theme.
If there is a simple way of solution, could anyone please show me how to do it?
Solved! Go to the solution
This is an accepted solution.
Hello @palettepaws
To customize the collection list section in your Shopify theme, follow these steps:
Step 1: Open Theme Editor
Step 2: Add Button Link Schema
After the existing checkbox schema, add the following code:
{
"id": "link",
"type": "url",
"label": "Button link"
},
Step 3: Update View All Link
Remove the existing code:
{%- if section.settings.show_view_all and show_mobile_slider -%}
<a href="{{ routes.collections_url }}" class="link underlined-link large-up-hide">{{ 'sections.collection_list.view_all' | t }}</a>
{%- endif -%}
Replace it with:
{%- if section.settings.show_view_all and show_mobile_slider -%}
<a href="{{ section.settings.link }}" class="link underlined-link large-up-hide">{{ 'sections.collection_list.view_all' | t }}</a>
{%- endif -%}
Step 4: Update View All Button
Remove the existing code:
{%- if section.settings.show_view_all and section.blocks.size < collections.size -%}
<div class="center collection-list-view-all{% if show_mobile_slider %} small-hide medium-hide{% endif %}">
<a href="{{ routes.collections_url }}" class="button">{{ 'sections.collection_list.view_all' | t }}</a>
</div>
{%- endif -%}
Replace it with:
{%- if section.settings.show_view_all and section.blocks.size < collections.size -%}
<div class="center collection-list-view-all{% if show_mobile_slider %} small-hide medium-hide{% endif %}">
<a href="{{ section.settings.link }}" class="button">{{ 'sections.collection_list.view_all' | t }}</a>
</div>
{%- endif -%}
This is an accepted solution.
Hello @palettepaws
To customize the collection list section in your Shopify theme, follow these steps:
Step 1: Open Theme Editor
Step 2: Add Button Link Schema
After the existing checkbox schema, add the following code:
{
"id": "link",
"type": "url",
"label": "Button link"
},
Step 3: Update View All Link
Remove the existing code:
{%- if section.settings.show_view_all and show_mobile_slider -%}
<a href="{{ routes.collections_url }}" class="link underlined-link large-up-hide">{{ 'sections.collection_list.view_all' | t }}</a>
{%- endif -%}
Replace it with:
{%- if section.settings.show_view_all and show_mobile_slider -%}
<a href="{{ section.settings.link }}" class="link underlined-link large-up-hide">{{ 'sections.collection_list.view_all' | t }}</a>
{%- endif -%}
Step 4: Update View All Button
Remove the existing code:
{%- if section.settings.show_view_all and section.blocks.size < collections.size -%}
<div class="center collection-list-view-all{% if show_mobile_slider %} small-hide medium-hide{% endif %}">
<a href="{{ routes.collections_url }}" class="button">{{ 'sections.collection_list.view_all' | t }}</a>
</div>
{%- endif -%}
Replace it with:
{%- if section.settings.show_view_all and section.blocks.size < collections.size -%}
<div class="center collection-list-view-all{% if show_mobile_slider %} small-hide medium-hide{% endif %}">
<a href="{{ section.settings.link }}" class="button">{{ 'sections.collection_list.view_all' | t }}</a>
</div>
{%- endif -%}
Awesome. Your instructions are very clear. and it's really helpful. It works. Thank you so much!
Hello @palettepaws
Thank you for your response. It's good to know that it's worked for you. Kindly feel free to get back to me if you need any further assistance.
If helpful then please Like and Accept Solution.
Awesome man! This worked like a charm. Great job! Thanks so much.
Hey Community! As the holiday season unfolds, we want to extend heartfelt thanks to a...
By JasonH Dec 6, 2024Dropshipping, a high-growth, $226 billion-dollar industry, remains a highly dynamic bus...
By JasonH Nov 27, 2024Hey Community! It’s time to share some appreciation and celebrate what we have accomplis...
By JasonH Nov 14, 2024