Object handles

Handles are used to access the attributes of Liquid objects. Most objects in Shopify (products, collections, blogs, articles, menus) have handles. For example, a page with the title "About Us" can be accessed in Liquid using its handle about-us.

By default, a handle is the object's title in lowercase with any spaces and special characters replaced by hyphens (-).

A product with the title "Shirt" is automatically given the handle shirt. If there is already a product with the handle shirt, the handle will auto-increment. In other words, all "Shirt" products created after the first one will receive handles like shirt-1, shirt-2, and so on.

If you want to get the handle of a product use product.handle.