routes
Canonical URLs for built-in routes (cart, search, account…). Use instead of hard-coding paths.
Example
<a href="{{ routes.cart_url }}">Cart</a>Output:
<a href="/cart">Cart</a>Properties
| Property | Description |
|---|---|
routes.account_addresses_url | — |
routes.account_login_url | — |
routes.account_logout_url | — |
routes.account_profile_url | — |
routes.account_recover_url | — |
routes.account_register_url | — |
routes.account_rewards_url | — |
routes.account_url | — |
routes.all_products_collection_url | — |
routes.cart_add_url | — |
routes.cart_change_url | — |
routes.cart_clear_url | — |
routes.cart_update_url | — |
routes.cart_url | — |
routes.collections_url | — |
routes.predictive_search_url | — |
routes.product_recommendations_url | — |
routes.root_url | — |
routes.search_url | — |
routes.storefront_login_url | — |
Property list is generated from the storefront engine (RoutesDrop), so it always matches what your theme can use. Inspect live values with {{ routes | json }}.