The handle object
handle object returns the handle of the following resources:
You can view and edit a resource's handle from the Shopify admin in the Search engine listing preview section:
Targeting webpagesAnchor link to section titled "Targeting webpages"
You can use the
handle object to target specific webpages for instances where you want to show different content on different pages. For example, to display a message only on a webpage with the handle
top-secret, you could add the following code to the
Webpages that don't have their own handleAnchor link to section titled "Webpages that don't have their own handle"
Not all webpages have their own handle.
Your store's home page, which uses the template
index.liquid, will not return any value for
Special charactersAnchor link to section titled "Special characters"
Because handles are used for storefront navigation, they must contain only alpha-numeric characters (a-z, 0 to 9). The following character cannot be used:
- accents, such as umlauts, and other diacriticals
- symbols, such as
Note that spaces will be converted to hyphens, and other characters will either be removed entirely, or converted to an equivalent standard ASCII character.