Videos
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
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 %}
You have access to the current_tags, refer to docs: https://shopify.dev/docs/themes/liquid/reference/objects/current-tags
This will return an array of all the tags you are viewing at the moment (in case you are viewing more than one tag).
So your check will be:
{% if current_tags contains 'mens' %}
do something
{% endif %}
That's pretty much the just of it.
I really like how the menu is coming along! Here are some ideas you could consider for your category specific menu, if you've not gotten where you want yet.
For your url strategy, what you're looking for is handle. Handles are specific to liquid. https://shopify.dev/docs/themes/liquid/reference/basics/handle
You could make a custom collection template if those 2 categories need to be fairly different: https://shopify.dev/tutorials/customize-theme-create-alternate-templates. If you do that, then you can use
template_prefixfrom the collection object.Assign a variable outside your loop and then set it inside the loop like:
{% assign is_mens = false %} {% for tag in product.tags %} {% if tag contains 'mens' %} {% assign is_mens = true %} {% endif %} {% endfor %}
then {% if is_mens %} or {% unless is_mens %} for your dynamic content, or a case statement to define content specific to categories in your menu.
Hope this helps!