A type defines fields and presentational settings. Fields hold data which can easily be changed in the dashboard. Read on to discover the fields included with a default installation.
type('My type', {
title: text('Title', {width: 0.5}),
path: path('Path', {width: 0.5})
})
A type can be configured further by using the configure method:
type('Example type').configure({
...configuration
})
When a type is marked as a container it can contain subpages.
isContainer: true
In case this type is a container the allowed sub types can be declared in an array.
contains: ['PageA', 'PageB']
By marking a type as hidden it will not show up in the sidebar entry tree.
isHidden: true
An icon can be used to label a root in the sidebar. Must be a react component. You can find icons on https://icones.js.org or install a package such as react-icons (https://react-icons.github.io/react-icons).