PageList
The page_list
object provides access to lists of pages in the store, such as all pages or only root-level pages.
Usage Example
templates/sitemap.liquid
{%- comment -%} List all pages in the store {%- endcomment -%}
<ul>
{% for page in page_list.all %}
<li><a href="{{ page.handle | link }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
{%- comment -%} List only root pages {%- endcomment -%}
<ul>
{% for page in page_list.root %}
<li><a href="{{ page.handle | link }}">{{ page.title }}</a></li>
{% endfor %}
</ul>
Properties
all
Lists all available pages in the store.
root
Lists root-level pages in the store.
Last updated on