Skip to content

Latest commit

 

History

History
36 lines (27 loc) · 806 Bytes

pages.md

File metadata and controls

36 lines (27 loc) · 806 Bytes

Pages

Pages as the tangible representation of a Waypoint. You visit Waypoints during a journey, but you interact with forms on Pages.

The definition for a Page looks like this:

{
  // The waypoint this Page represents
  waypoint: 'details',

  // The Nunjucks template that renders this page
  view: 'pages/details.njk',

  // Hooks that will only run on requests to this Page
  hooks: [{ ... }],

  // Information about all the fields on your page form
  fields: [{ ... }],
}

See hooks, and fields documentation for more details on each respectively.

Passing your Page definitions into configure():

configure({
  pages: [{
    waypoint: 'details',
    view: 'pages/details.njk',
    hooks: [{ ... }],
    fields: [{ ... }],
  }],
});