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 OverflowTo 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
use dash(-) instead of space in collection name like "sale potions" then it will be "sale-potions"
{% for product in collections['sale-potions'].products %}
{{- product.title | link_to: product.url }}
{% endfor %}