How to check what type of page you're on (product, collection, etc.)? 📄

### Explanation To check the current page type: ```liquid {% if request.page_type == 'product' %} // Product page specific content {% endif %} ``` Common page types: - `product` - `collection` - `page` - `blog` - `article` - `cart` - `index` (home page) Key points: - Use `request.page_type` - Available globally - Returns string value - Case sensitive comparison Reference: [Shopify Request Object](https://shopify.dev/docs/api/liquid/objects/request)

Answer Options:

  • {% if page.type == 'product' %}
  • {% if template == 'product' %}
  • {% if page_type == 'product' %}
  • {% if request.page_type == 'product' %}
Shopify Free Test
← PreviousQuestion 1 of 1Finish →
00
← PreviousFinish →
Copyright ©Michael Bollin. Found some mistake?[email protected]