--- url: https://developer.youcan.shop/themes/objects/collections.md --- # `collections` object All of the store's visible categories. Look up one category by its slug with `collections['slug']` or `collections.slug`. The result is a [category](category) object, or nil. `collections['all']` is a collection of every visible product, unless the store has a category with the slug `all`. It is also the page at `/collections/all`. Looping over `collections` gives the visible top-level categories, 50 at a time. Use [paginate](../tags/paginate.md) for more. `collections.size` is the number of visible top-level categories. ```liquid {% assign shoes = collections['shoes'] %} {% for product in shoes.products limit: 4 %} {{ product.name }} {% endfor %} {% for collection in collections %} {{ collection.title }} {% endfor %} ```