Prestige theme : subcollections on different pages, not menu

Prestige theme : subcollections on different pages, not menu

HAVVApoint
Visitor
2 0 0

Hi everyone, 

 

I'm stuck here : I'm trying to create new pages where I can show subcollections.

In fact, the different collections are on the home page, but when you click on one, I want to land on a different page that show the subcollections.

I use the Prestige theme, and I don't think they have that kind of option...

 

So I tried to create new templates for collection page by copy the code. The new template is indeed created, so I create the new page with the new collection page template, I create the new menu in navigation. Until then everything is fine...

 

The problem is, and I don't understand why (i'm not a coder...) :

Now there is page collection A (with template A), and page collection B (with template B).

When I want to personalize the theme and change the different subcollections on page collection B, the subcollection of page collection B changes also !

 

What can I do ?

Is it something to change in the code ?

Replies 2 (2)

HAVVApoint
Visitor
2 0 0
Hi there !

I'm stuck here : I'm trying to create new pages where I can show subcollections.

In fact, the different collections are on the home page, but when you click on one, I want to land on a different page that show the subcollections.

I use the Prestige theme, and I don't think they have that kind of option...

So I tried to create new templates for collection page by copy the code. The new template is indeed created, so I create the new page with the new collection page template, I create the new menu in navigation. Until then everything is fine...

The problem is, and I don't understand why (i'm not a coder...) :

Now there is page collection A (with template A), and page collection B (with template B).

When I want to personalize the theme and change the different subcollections on page collection B, the subcollection of page collection B changes also !

What can I do ?
Is it something to change in the code ?

Minakshi15
Shopify Partner
148 6 14

Hii Havaapoint

 

Please create template (subcollection.liquid) and added this code

 

{%- comment -%} COLLECTION HEADER {%- endcomment -%}
{%- assign collection_handle = collection.handle -%}
{%- assign subs = linklists[collection_handle].links -%}
{% if subs != blank %}
<div class="collection-subs">
<div class="wrapper">
<div class="row">
{% for sub in subs %}
{% assign subitem_handle = sub.title | handle %}
<div class="col">
<div class="sub-collection_item">
{% if collections[subitem_handle].image %}
<div class="image-custom">
<a href="{{ collections[subitem_handle].url }}"> <img class="img-fluid image-responsive" src="{{ collections[subitem_handle].image | img_url: 'master' }}" alt="Sub image"></a>
</div>
{% else %}
<div class="image-custom" style="padding-top: 128%;">
{{ 'collection-1' | placeholder_svg_tag }}
</div>
{% endif %}
<div class="sub-collection_title">
<a href="{{ collections[subitem_handle].url }}">{{ collections[subitem_handle].title }}</a>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
{% endif %}

 

and render this code on main-collection section like this 

{% render 'subcollection' %} 

If you find my reply helpful, please hit Like and Mark as Solution