To access specific collection attributes, you must know collection handle and use this kind of code :

{{ collections['the-handle'].url }}

So to achieve what you want to do, here is what you could do:

{% assign collection_handle = 'the-handle-of-collection-you-want' %}
{% for product in collections[collection_handle].products %}
    Do your stuff
{% endfor %}

Note that you cannot access a collection through its title. Only handle.

Learning more about what's handle: https://help.shopify.com/themes/liquid/basics/handle

HTH

Answer from Alice Girard on Stack Overflow
🌐
HulkApps
hulkapps.com › home › shopify hub › a complete guide on how to get collection handle in shopify
A Complete Guide on How to Get Collection Handle in Shopify
April 11, 2024 - Accessing a collection handle can be achieved by tapping into Shopify's Liquid objects. When you're on a collection page, the Liquid object 'collection' becomes available, and accessing the 'handle' attribute of this object retrieves the ...
🌐
Shopify
shopify.dev › docs › api › liquid › objects › collection
Liquid objects: collection
The tags that are currently applied to the collection. This doesn't include tags for products that have been filtered out of the current view. Returns nil if no tags have been applied, or all products with tags have been filtered out of the ...
🌐
Foobartel
foobartel.com › articles › shopify-collections
Shopify: Achieving Collections in Collections - foobartel.com
Since this template is only used for the looks collection, I called it “collections.looks.liquid”. When creating a new looks collection, this also is the template that has to be selected to render the particular collection. The collection.looks.liquid file contains the following code: First of all, I’m checking if the current collection handle is “looks-girls”. If that’s the case, I go ahead and find all collections with a name containing “looks-girls-“ — the important part here is the trailing “-“ in the handle.
🌐
Shopify
shopify.dev › docs › api › admin-graphql › latest › queries › collectionbyhandle
collectionByHandle - GraphQL Admin
Collections can be displayed in a store with Shopify's theme system through Liquid templates and can be customized with template suffixes for unique layouts. They also support advanced features like translated content, resource feedback, and ...
🌐
Markdunkley
cheat.markdunkley.com
Shopify Cheat Sheet - Liquid variables
The handle of a collection with the title "Winter Sale" would be "winter-sale".
🌐
Entaice
entaice.com › blog › shopify-liquid-get-collection-by-handle
How to Fetch Collections in Shopify Using Liquid's Handle | Entaice
September 7, 2023 - Dive into the world of Shopify's Liquid templating language to expertly pull collection details using handles; perfect for customizing store themes.
Find elsewhere
🌐
EComposer
ecomposer.io › blogs › news › shopify-collection-page-templates
10+ Effective collection page templates in Shopify - EComposer
Application for all Collections: All of your collections will have the EComposer Collection template applied as a result of this activity. It will replace the default Shopify template.
Rating: 5 ​ - ​ 2.15K votes
🌐
User Guides
support.cleancanvas.co.uk › hc › en-us › articles › 11591318341917-Collection-page
Collection page – User Guides
To control what is shown or change the collection heading, go to the Shopify admin area and create a new automated collection of all products and give this new collection the handle all.
🌐
Avada
avada.io › home › shopify › shopify devdocs › how to create a collection-aware product url in shopify
How to Create a Collection-aware product URL in Shopify
February 25, 2025 - The product URL is a place where collection-handle is the handle of the collection that is currently being viewed. Let’s move to the next part to see how to create a collection-aware product URL. Take a look at the example below. ... Attention: when a product belongs to collection-aware, its product template can access the collection output.
🌐
Shopify Community
community.shopify.com › store design
How to add custom line item property based on collection type?
August 9, 2023 - Hello, I am trying to add a custom line item property to the product template in the latest version of the Origin theme. I have done so successfully and it is showing, but I cannot seem to make it render based on collection type. For example: {% if collection.handle == 'shopify' %} The first ...
🌐
LOGEIX
logeix.com › home › blog › how to add sub-collections on shopify
How to Add Sub-Collections on Shopify — LOGEIX
3 weeks ago - Then you just edit your collection template file with some code like: {% for link in linklists['collection-filters-menu'].links %} {% comment %} ^ Get this handle from your Navigation menu, you can see it on the right sidebar ^ {% endcomment %} {% if link.url == collection.url %} {% for sublink in link.links %} {% assign coll1Handle = sublink.url | split: '/collections/' %} {% assign coll1 = collections[coll1Handle[1]] %} {% if coll1.products.size > 0 %} {% if coll1.metafields.custom.color_icons != blank %} <li class="subcolletion"> <a href="{{ sublink.url }}">{{ sublink.title }}</a> </li> {% endif %} {% endif %} {% endfor %} {% break %} {% endif %} {% endfor %}
🌐
Shopify Help Center
help.shopify.com › en › manual › products › collections › collection-layout
Shopify Help Center | Collection layout and appearance
You can edit a collection's name or description, change its featured image, or change the display order of its products. If you've created custom templates for your collection page, then you can also use a different template.
🌐
Shopify Community
community.shopify.com › technical q&a
How can I add a second description to each collection bottom?
Hi! I would like to add a second description at the bottom of each collection. The description will be different for each collection. How can I do this? I’m using Impulse Impulse v.1.0 For example this is a collection page that I would like to add a second description below the products ...
Published   February 22, 2023
🌐
EcommerceGold
ecommerce-gold.com › how-to-create-a-page-of-collections-on-shopify
How to Create a Page of Collections on Shopify
October 2, 2025 - To add the new template, select the page from the drop-down menu, name it list-collections and then click Create template to create the new template. By default, Shopify adds some basic code to this site, which needs to be removed in order to ...
🌐
Entaice
entaice.com › blog › shopify-if-collection-handle-contains
Unlocking Shopify Collections with Dynamic Handle Checks | Entaice
March 12, 2023 - Hardcoding each possible handle would be a nightmare, right? Hence, you look for a way to check if a collection’s handle contains a certain string or pattern. Shopify uses a template language called Liquid.
🌐
Shogun
getshogun.com › learn › shopify-collection-list-template-liquid
Common Shopify Collection List Template Edits using Liquid
October 10, 2024 - Select “Edit code” — this will open Shopify’s code editor. In Shopify’s default Dawn theme, the collection list template can be found in the “Templates” folder (the file name is “list-collections.json”).
🌐
Shopify
shopify.com › partners › shopify-cheat-sheet
Shopify Cheat Sheet — A resource for building Shopify Themes with Liquid
The handle is used to access the attributes of a Liquid object. By default, it is the object’s title in lowercase with any spaces and special characters replaced by hyphens (-). Every object in Liquid (product, collection, blog, menu) has a handle.