Skip to content

pages

The global pages object is both an enumerable list of published online-store pages and a handle lookup.

Lookup example

{% assign about = pages['about-us'] %}
{% if about %}
<a href="{{ about.url }}">{{ about.title }}</a>
{% endif %}

Pagination example

{% paginate pages by 24 %}
{% for page in pages %}
<a href="{{ page.url }}">{{ page.title }}</a>
{% endfor %}
{{ paginate | default_pagination }}
{% endpaginate %}

Direct lookup is limited to 20 unique handles per render. The ordinary array view loads at most 50 pages; {% paginate %} supports page sizes from 1 to 250. Missing, unpublished, malformed, and over-limit handles return nil. Counts use the storefront 25,001 sentinel for larger result sets.

Properties

PropertyDescription
pages.firstFirst page in the default published-page slice, or nil when the store has no pages.
pages.lastLast page in the default published-page slice, or nil when the store has no pages.
pages.lengthNumber of pages in the default published-page slice, capped at 50.
pages.sizeAlias of length.

Page handles are also available as dynamic keys. See page for each returned object’s properties.

Property list is generated from the storefront engine (PagesDrop), so it always matches what your theme can use. Use {{ pages | json }} only as a curated debug snapshot; it can omit lazy or otherwise public properties.