Receive in the liquid template only those products that will be rendered

Topic summary

A developer is building a Shopify embed extension and needs to access paginated products from a collection page (e.g., xxx.myshopify.com/collections/all).

The Challenge:

  • The standard approach uses {%- paginate collection.products by section.settings.products_per_page -%} in the main-collection-product-grid.liquid file
  • Embed extensions cannot access the section object, which contains the products_per_page setting
  • This value is stored in templates.collection.json

Key Question:
The developer is asking:

  • How to retrieve the products_per_page parameter without section access
  • Whether an alternative method exists to fetch these paginated products

The post includes code snippets and a screenshot showing the template structure. The discussion remains open with no solutions provided yet.

Summarized with AI on November 11. AI used: claude-sonnet-4-5-20250929.

I’m creating an embed extension. For the extension to work successfully, you need to get products that are displayed at xxx.myshopify.com/collections/all, taking into account pagination.
Sections/main-collection-product-grid.liquid - does it like this

{%- paginate collection.products by section.settings.products_per_page -%}

Since I’m making an embed extension I don’t have access to section (section.settings.products_per_page)
this value is stored in templates.collection.json



how can I get this parameter? Or is there another way to get these products?
My code:

{%- if collection.products.size != 0 -%}
{%- paginate collection.products by $there should be a parameter here$ -%}
{% assign jsonObjects = "" %}
{% for product in collection.products %}

...

{% endfor %}
{%- endpaginate -%}
{%- endif -%}

{% schema %}
{
"name": "Collection product",
"target": "body",
"settings": []
}
{% endschema %}