pages
Display sets of pages in various ways.
{{ pages:listing }}
Displays a list of pages from one or more folders.
Sample Usage
<ul>
{{ pages:listing }}
<li>
<a href="{{ url }}">{{ title }}</a>
</li>
{{ /pages:listing }}
</ul>
Parameters
This tag accepts the following parameters:
folder
— a folder (or pipe-separated list of folders) from which to pull pages, the current folder by default; as of v1.5.3: you can use a*
character at the end of your folder to select any page whose folder starts with the text before the*
, this will let you look in all subfolders easilytaxonomy
— a boolean of whether to use the current URL as a taxonomy URL or not, only pulling pages of taxonomy matches whentrue
,false
by defaultshow_hidden
— a boolean of whether to show hidden files or not,false
by defaultconditions
— a comma-separated string ofkey:value
pairs limiting results of the pages pulled back,null
by defaultsort_by
— the field to sort the pages list on,order_key
by default (order_key being either slug-based or number-based, automatically detected)sort_dir
— the direction the sorting should happen, eitherasc
ordesc
, by default this is dependant onsort_by
, it’s a good idea to always set thissort
— added in v1.9 allows you to specify one or moresort_by
andsort_dir
at the same time in one parameter, accepts a comma-separated list offield_name asc|desc
limit
— the maximum number of pages to display,null
(no limit) by defaultoffset
— the number of pages to skip over (after sorting has been applied) before displaying the first pages in a listing,0
by default
Available Tags
Aside from any variable set in your settings, global variables, theme, and content front-matter, the following tags also become available:
first
— a boolean of whether this is the first page in the listing that will be looped overlast
— a boolean of whether this is the last page in the listing that will be looped overindex
— a 1-based iterator counting the number of times the listing has been looped overzero_index
— a 0-based iterator counting the number of times the listing has been looped overtotal_results
— the number of results that the listing will print