Stay up to date

Developer changelog


The 'Pages' global Liquid object is now iterable

Effective May 21, 2021


You can now iterate through the global Liquid Pages object, instead of only being able to directly reference known pages through their handle. This allows you to access a paginated pages listing of up to 50 items at a time and produce HTML that is conditional to the page data that is available.

You can return properties for a specific page using {{ pages.pagename.propertyname }}:

<h1>{{ pages.about.title }}</h1>
<p>{{ }} says...</p>
<div>{{ pages.about.content }}</div>

You can also interate through up to 50 pages at a time with pagination:

{%- paginate pages by 50 \-%}
    {%- for p in pages -%}
    {%- endfor -%}
    {{ paginate | default\_pagination: next: 'Older', previous: 'Newer' }} 
{%- endpaginate \-%}