Pages

Allows you attach other Pages to your content.

Learn by watching!
Check out the fundamentals screencast on Pages.

Preview

Pages Fieldtype

Usage

This fieldtype is used to view a list of Pages and select one or more of them. You can choose a parent to start from, listing only its child pages. You can also control the depth it will include in your list (e.g. subpage, sub-subpages, etc).

fields:
  my_pages_field:
    display: Link to Page
    type: pages

Data Structure

The Pages fieldtype is a Relate fieldtype, which means the data will be saved as content IDs.

pages:
  - 892jfsd9a90as
  - 134jk1h78dfas

Templating

Use the Relate tag to loop through the IDs and fetch the content data.

<ul>
  {{ relate:pages }}
    <li>{{ title }}</li>
  {{ /relate:pages }}
</ul>
<ul>
  <li>How to Basic</li>
  <li>How to Extreme</li>
</ul>

Settings

This fieldtype supports the following settings in addition to the settings available in the Relate fieldtype.

parent

string

The URL or ID of a page if you want to only show its children.

depth

integer

The level of child pages to traverse when using the parent option.

Last modified on March 20, 2018