How to get the current page path? 🔗

### Explanation To get the current page path: ```liquid {{ request.path }} // Returns the path portion of the URL ``` Key points: - `request.path` returns the path portion of the URL - `shop.url` returns the full URL of the store - Available globally - Useful for conditional logic Example: ```liquid {% if request.path contains '/products/' %} {% endif %} ``` Reference: [Shopify Request Object](https://shopify.dev/docs/api/liquid/objects/request)

Answer Options:

  • {{ page.url }}
  • {{ current_path }}
  • {{ request.path }}
  • {{ shop.url }}
Shopify Free Test
← PreviousQuestion 1 of 1Finish →
00
← PreviousFinish →
Copyright ©Michael Bollin. Found some mistake?[email protected]