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 ?
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 ?
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 %}
{% for sub in subs %}
{% assign subitem_handle = sub.title | handle %}
{% if collections[subitem_handle].image %}
{% else %}
{{ 'collection-1' | placeholder_svg_tag }}
{% endif %}
{% endfor %}
{% endif %}
and render this code on main-collection section like this
{% render ‘subcollection’ %}