What's your biggest current challenge? Have your say in Community Polls along the right column.

How Can I change the "View All" Button Link of Collection List

Solved

How Can I change the "View All" Button Link of Collection List

palettepaws
Excursionist
14 0 7

help.PNG

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?

Accepted Solution (1)

ZestardTech
Shopify Partner
5912 1067 1413

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

 

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find sections > collection-list.liquid.

 

Step 2: Add Button Link Schema

 

After the existing checkbox schema, add the following code:

 

{
  "id": "link",
  "type": "url",
  "label": "Button link"
},

 

ZestardTech_0-1692618007475.png

 

ZestardTech_5-1692618485923.png

 

 

 

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 -%}

 

ZestardTech_1-1692618094922.png

 

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 -%}

 

ZestardTech_2-1692618276010.png

 

 

 

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 -%}

 

ZestardTech_3-1692618392625.png

 

 

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 -%}

 

ZestardTech_4-1692618433871.png

 

 

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing

View solution in original post

Replies 4 (4)

ZestardTech
Shopify Partner
5912 1067 1413

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

 

  1. In your Shopify Admin go to online store > themes > actions > edit code
  2. Find sections > collection-list.liquid.

 

Step 2: Add Button Link Schema

 

After the existing checkbox schema, add the following code:

 

{
  "id": "link",
  "type": "url",
  "label": "Button link"
},

 

ZestardTech_0-1692618007475.png

 

ZestardTech_5-1692618485923.png

 

 

 

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 -%}

 

ZestardTech_1-1692618094922.png

 

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 -%}

 

ZestardTech_2-1692618276010.png

 

 

 

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 -%}

 

ZestardTech_3-1692618392625.png

 

 

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 -%}

 

ZestardTech_4-1692618433871.png

 

 

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing
palettepaws
Excursionist
14 0 7

Awesome. Your instructions are very clear. and it's really helpful. It works. Thank you so much!

ZestardTech
Shopify Partner
5912 1067 1413

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.

Want to modify or develop new app, Hire us.
If helpful then please Like and Accept Solution .
Email: support@zestard.com
Shopify Apps URL :- https://apps.shopify.com/partners/zestard-technologies
Custom Modifications Into Shopify Theme | Shopify Private App | SEO & Digital Marketing
tarek_guma
Excursionist
22 0 3

Awesome man! This worked like a charm. Great job! Thanks so much.