I am thinking of have:
A page that list all the product types, each product type will link toward a search result page list all the products under that product type.
Can I have a step to step guide to setup such page?
Thank you
Goal: create a page that lists all product types, each linking to a page showing products of that type.
Implementation shared:
Follow-ups and open questions:
Status: partial solution given (Liquid and placement). Routing to a specific URL and link formatting remain unresolved; no final decision or steps confirmed.
I am thinking of have:
A page that list all the product types, each product type will link toward a search result page list all the products under that product type.
Can I have a step to step guide to setup such page?
Thank you
Uses collection.all_types property
https://shopify.dev/api/liquid/objects/collection#collection-all_types
{% for product_type in collection.all_types %}
{{ product_type | link_to_type }}
{% endfor %}
For OS2.0 themes place the code either in a custom-liquid block or a section in the visual theme editors settings.
For vintage themes create an alternate template for pages and use the code in that file in the themes file code editor.
https://shopify.dev/themes/architecture/templates#alternate-templates
@PaulNewton Would you have more instruction with OS2.0? I am usin Dawn theme.
I created a templates/page.catalog.liquid file under admin/themes/
After I put your instructed code in it, how to make this liquid template that connected to a route? let say if I want the route to be XXX.com - XXX Sex Videos - Free ■■■■ Movies