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
| Property | Description |
|---|---|
pages.first | First page in the default published-page slice, or nil when the store has no pages. |
pages.last | Last page in the default published-page slice, or nil when the store has no pages. |
pages.length | Number of pages in the default published-page slice, capped at 50. |
pages.size | Alias 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.