Creating Blueprints
Entries automatically discovers blueprint files inside site/entries/. Each subfolder maps to one blueprint kind, and the filename (without extension) becomes the blueprint machine handle.
Directory layout
Section titled “Directory layout”Directorysite/
Directoryentries/
Directorysingles/
- website-settings.yaml
- WebsiteSettingsSingle.php
Directorycollections/
- seasons.yaml
- SeasonsCollection.php
- SeasonItem.php
Directoryblocks/
- itinerary_day.yaml
- ItineraryDayBlock.php
Directoryfieldsets/
- seo.yaml
Directorytables/
- booking_holds.yaml
Directoryoptions/
- countries.php
Directoryseeds/
- ports.php
YAML vs. PHP blueprints
Section titled “YAML vs. PHP blueprints”Write blueprints in YAML for clean version-controlled schemas, or in PHP when you need closures (such as computed fields), dynamic labels, or shared PHP constants.
title: Charter Seasonskind: collectionicon: calendarlabelField: titlecolumns: [title, code, rate_multiplier, is_default]filters: [is_peak]sort: sortunique: codeexclusive: is_defaultpublishable: truerevisions: 10drafts: truerestrictOnDelete: true
fields: title: type: text label: Season Name required: true index: true columnWidth: 50 code: type: text label: Season Code required: true index: true columnWidth: 25 is_default: type: toggle label: Default Season columnWidth: 25 rate_multiplier: type: float label: Rate Multiplier default: 1.0 index: true<?php
declare(strict_types=1);
return [ 'title' => 'Charter Seasons', 'kind' => 'collection', 'icon' => 'calendar', 'labelField' => 'title', 'columns' => ['title', 'code', 'rate_multiplier', 'is_default'], 'filters' => ['is_peak'], 'sort' => 'sort', 'unique' => 'code', 'exclusive' => 'is_default', 'publishable' => true, 'revisions' => 10, 'drafts' => true, 'restrictOnDelete' => true, 'fields' => [ 'title' => [ 'type' => 'text', 'label' => 'Season Name', 'required' => true, 'index' => true, 'columnWidth' => 50, ], 'code' => [ 'type' => 'text', 'label' => 'Season Code', 'required' => true, 'index' => true, 'columnWidth' => 25, ], 'is_default' => [ 'type' => 'toggle', 'label' => 'Default Season', 'columnWidth' => 25, ], 'rate_multiplier' => [ 'type' => 'float', 'label' => 'Rate Multiplier', 'default' => 1.0, 'index' => true, ], ],];Single blueprint example (YAML)
Section titled “Single blueprint example (YAML)”For global settings or singleton configuration, set kind: single inside site/entries/singles/:
title: General Settingskind: singleicon: adjustments-horizontalrevisions: 5
fields: site_name: type: text label: Site Name required: true useLanguages: true inheritLanguage: true columnWidth: 50
support_email: type: email label: Support Email columnWidth: 50
announcement_enabled: type: toggle label: Show Announcement BannerComplete blueprint options reference
Section titled “Complete blueprint options reference”| Option | Type | What it controls |
|---|---|---|
title |
string |
Human-readable label shown in the admin sidebar and headings |
kind |
string |
single, collection, block, or fieldset |
icon |
string |
Icon name displayed beside the blueprint in the workspace |
labelField |
string |
Field used as the primary display label in tables, pickers, and breadcrumbs |
titleFormat |
string |
Auto-generated label template combining fields (for example, "{code} - {title}") |
summaryFormat |
string |
Compact summary shown on collapsed block headers |
columns |
string[] |
Default columns displayed in the collection table viewport |
columnTruncate |
array<string, int> |
Per-column character truncation limits (for example, { title: 42 }) |
filters |
string[] |
Quick filter dropdowns shown above the collection table |
views |
array |
Named saved filter presets rendered as quick-filter tabs (selector, label, icon, layout, sort) |
layout |
string |
Default collection view (table, cards, kanban, or calendar; alias viewMode) |
layouts |
string[] |
Allowlisted collection views ([table, cards, kanban, calendar]) |
kanbanField |
string |
Single-option select or radios field used for Kanban lanes |
calendarStartField |
string |
Start date/datetime field for the Calendar viewport |
calendarEndField |
string |
Optional end date/datetime field for multi-day Calendar spans |
sort |
string |
Default sort order (sort, -created, -published_date) |
sluggable |
bool |
Set to false (or useSlug: false) when records identify only by UUID or custom keys |
hierarchical |
bool |
Enables two-level parent/child nesting inside a collection |
unique |
string | array |
Enforces unique values on one field or a composite tuple ([season, yacht_id]) |
exclusive |
string | array |
Ensures only one record (optionally scoped by another field) has a toggle enabled |
publishable |
bool |
Adds publish_from and publish_until scheduling fields |
drafts |
bool |
Enables or disables working drafts (true by default) |
revisions |
bool | int |
Stores up to N point-in-time snapshots per record |
locked |
bool |
Tier 1 blueprint-level lock: prevents editing, trashing, or deleting all records of this blueprint |
restrictOnDelete |
bool |
Prevents deleting a record while other entries or pages reference it |
permission / permissions |
string | array |
Blueprint-level or action-scoped RBAC permissions (view, create, edit, delete, export) |
seed |
array | string |
Inline starter records or path to a PHP/YAML seed file (seeds/ports.php) |
extends |
string |
Inherits fields and settings from another base blueprint |
hidden |
bool |
Hides internal module blueprints from the generic Setup -> Entries list |
Blueprint inheritance (extends)
Section titled “Blueprint inheritance (extends)”Share common base fields across sibling collections with extends:
extends: journal_articlestitle: Press Releasesfields: embargo_date: type: date label: Embargo Date index: trueTypeScript and JSON Schema generation
Section titled “TypeScript and JSON Schema generation”Generate TypeScript interfaces for your frontend directly from blueprints:
php vendor/bin/wire entries:types --typescript --output=resources/types/entries.d.tsIn PHP, export standard JSON Schema or permission-filtered editorial JSON Schema for headless APIs or form tooling:
<?php
declare(strict_types=1);
namespace ProcessWire;
$entries = wire()->entries;$bp = $entries->registry()->get('seasons');
if ($bp !== null) { $jsonSchema = $bp->toJsonSchema($entries->registry(), [], $entries->optionsResolver()); $editorialSchema = $bp->toEditorialJsonSchema($entries->registry(), [], wire()->user, $entries->optionsResolver());}