Pages can have different states in Kirby, allowing you to control who has access to content, to filter by status, or to implement a full publishing workflow from drafts to published in the Panel.
Kirby automatically locks pages that are currently being edited by another user, making working in teams a lot safer. If you open a page that is edited by another user, you are informed about the editing user and cannot overwrite their changes.
If the editing user doesn't save their changes within 2 minutes, you can unlock the page. If you do so, the editing user is informed that their changes have been overwritten and can then download them to edit the unsaved changes manually.
Kirby's page states give you full control over your publishing workflow. They allows you to define access to content, to filter content by status criteria and much more.
Let's look at what the three states mean again before we go into details:
|Draft||Draft pages live in the
|Unlisted||Unlisted pages are published pages without a prepended number. They are accessible via their URL but they are not sorted based on their folder number.|
|Listed||Listed pages are published pages with a prepended number by which they can be sorted. You can use one of three sorting schemes for these numbers.|
To publish a draft in the Panel, click on the "Draft" button with the red status icon in the toolbar or go to "Settings" > "Change status".
To publish a draft manually in your content folder, drag it from the
_drafts folder to the parent directory:
This will make the page
listed. You can apply sorting by prepending a number. Optionally, you can then delete the
_drafts folder if it's no longer needed or just leave it in place.
Drafts are not included in
$page->children() collections. If you have to access them in your templates, you can use the
Listed pages are public pages with a sorting number in their content folder. You can choose between three different numbering schemes, depending on what is most useful for the type of page.
For a basic menu, a list of projects or any other non-alphabetical list you often need manual sorting. Manual sorting is applied by prepending a number followed by an underscore:
For blogs, events or anything else that is date-based, the date can be prepended as the sorting number, also followed by an underscore:
To sort pages alphabetically, 0 is prepended as the sorting number in the file system:
Pages without a sorting number are unlisted pages. Unlisted pages are still accessible by anyone who knows the URL to the page. Unlisted pages are useful if you want to exclude them from menus or lists. A typical example for an unlisted page would be the error page or maybe a new project that still needs to be reviewed by the client via URL, but not yet listed.