Add a new page under standard Collections menu (Brooklyn)

Highlighted
Excursionist
39 0 10

Hello all,

I have created my own page template to list collections and can add it in Navigation as normal.

The point is that I want these new pages I create to be seen by Shopify as collections and not just as a new page template.

The scope is to be able to go to Online Store --> Customize --> Collections and make it appear on the left side as a collection that can be added as any other normal collection created through the Shopify admin interface. Actually, it is not listed among the existing collections that I can choose while in Customize.

Does anybody knows what code is needed or what page/template do I need to alter in order to do that?

 

Regards,

DuchessLB

0 Likes
Shopify Partner
151 23 31

@DuchessLB Hello,

For Shopify, it is not possible to change a type of template.

So, if you customize a page to have it looks like a collection, for Shopify it is still a page since it has been created on the basis of a Page template.

Instead, you can customize a Collections template directly. Will this work?

1 Like
Highlighted
Excursionist
39 0 10

Hello @Sasha2 ,

Thank you for the answer: Now I understand why it is not possible.

So, if I customize a Collections template directly will I be able to make it appear under Collections as normal?

Can you please provide me with some steps in order to try it?

Regards,

DuchessLB

0 Likes
Highlighted
Shopify Partner
151 23 31

@DuchessLB 

Sure, a Collections template will appear under a Collections page of Theme settings.

To customize it, kindly provide changes for the "list-collections.liquid" file, that can find found in the Templates partition of your theme:

Screenshot_1.jpg

 

0 Likes
Highlighted
Excursionist
39 0 10

Hi @Sasha2 ,

Basically what I would like to do is to, for example, add my page

https://duchessluxuryboutique.com/pages/jewelry

under Collections.

What modifications should I do to the template you mentioned?

Regards,

DuchessLB

0 Likes
Highlighted
Shopify Partner
151 23 31

@DuchessLB 

Can you please share your theme password as well?

0 Likes
Highlighted
Shopify Partner
151 23 31

Hi @DuchessLB,

Thank you for password sharing.

To show Collections rows for the Collections template, kindly replace code of the "list-collections-template.liquid" section of your Debut theme:

  {%- assign blocks = section.blocks | sort: 'collection.all_products_count' -%}

  {% case section.settings.grid %}
    {% when 2 %}
      {%- assign grid_item_width = 'medium-up--one-half' -%}
      {%- assign image_size = '530x' -%}
    {% when 3 %}
      {%- assign grid_item_width = 'small--one-half medium-up--one-third' -%}
      {%- assign image_size = '350x' -%}
    {% when 4 %}
      {%- assign grid_item_width = 'small--one-half medium-up--one-quarter' -%}
      {%- assign image_size = '250x' -%}
    {% when 5 %}
      {%- assign grid_item_width = 'small--one-half medium-up--one-fifth' -%}
      {%- assign image_size = '225x' -%}
  {% endcase %}

  <ul class="grid grid--uniform">
    {% if section.settings.display_type == 'all' %}
      {% case section.settings.sort %}
        {% when 'products_high' or 'products_low' %}
          {%- assign collections = collections | sort: 'all_products_count' -%}
        {% when 'date' or 'date_reversed' %}
          {%- assign collections = collections | sort: 'published_at' -%}
      {% endcase %}
      {% if section.settings.sort == 'products_low' or section.settings.sort == 'date' or section.settings.sort == 'alphabetical' %}
        {% for collection in collections %}
          <li class="grid__item {{ grid_item_width }}">
            {% include 'collection-grid-item', collection: collection %}
          </li>
        {% endfor %}
      {% else %}
        {% for collection in collections reversed %}
          <li class="grid__item {{ grid_item_width }}">
            {% include 'collection-grid-item', collection: collection %}
          </li>
        {% endfor %}
      {% endif %}
    {% else %}
      {% for block in section.blocks %}
        <li class="grid__item {{ grid_item_width }}">
          {%- assign collection = collections[block.settings.collection] -%}
          {% include 'collection-grid-item', collection: collection %}
        </li>
      {% endfor %}
    {% endif %}
  </ul>

To the code, that you have used for the Cutom Page.

1 Like
Highlighted
Excursionist
39 0 10

Hello @Sasha2 ,

Thanks for the answer but that didn't do the trick since the code to replace from my custom page https://duchessluxuryboutique.com/pages/jewelry corresponds with exactly the same code to replace so nothing happens....

I think I will try another approach to this.

Thank you for your help!

Regards,

DuchessLB

0 Likes