Skip to content

Module and layout resources

Resource keyDefault / behavior
identifierRequired nonempty module identifier.
idComputed, immutable.
typemodule; mutable in this code line (changes the module class).
iconquestion
titleEmpty string; a field reference is checked when supplied.
parentLegacy parent module setting.
importablefalse; enables the import UI.
print_view, print_view_optionsView entity and map of print options.
buttonsMap of default module button overrides.
positionKeeps current position unless set.
owner_fieldField used as owner.
descriptionModule description.
optionsFree map; keys are interpreted by module class, capabilities and SPA.
fieldsList of field definitions, default [].
layoutsMap keyed by layout type.

Registered module classes: module, clients, files, permissions, policies, roles, users, views, configs, translations. See modules and field reference. Changing type is technically supported but can change base fields and behavior; inspect the plan before applying.

[{"resource_module":"notes","resource":{"identifier":"notes","type":"module","title":"name","importable":true,"description":"Notes","fields":[{"identifier":"name","type":"text","options":{"rules":"required"}}],"layouts":{"detail":"/modules/notes/notes.detail"}}}]

The example requires modules/notes/notes.detail.yaml or .json inside the system directory. Give the path without extension; YAML takes precedence over JSON. The loader resolves expressions inside the file and wraps its content as spec.

Do not put ${file(...)} or ${jsonFile(...)} directly in resource.layouts: authoring validation rejects these expressions. A missing path is interpreted as a JSON string and then fails if it is not valid JSON. A literal JSON string is accepted by the loader, but a file reference is easier to maintain.

A structured value must have the schema wrapper {"spec": { ... }} (optional identifier, type, computed id); a raw {"tabs": ...} object does not fill spec.

For example, the referenced JSON file can contain:

{"tabs":[{"identifier":"main","rows":[{"cols":[{"components":[{"type":"field_group","options":{"fields":["name"]}}]}]}]}]}

Standalone layouts require identifier; type defaults to detail, spec is a map and id is computed/immutable. Associate the layout through the consuming layout identifier or module layout configuration.

[{"resource_layout":"notes_panel","resource":{"identifier":"notes.panel","type":"detail","spec":{"tabs":[]}}}]

See layout structure and components.

Source: BakeryResourceModule::buildSchema, validateConfiguredLayouts, getLayouts; BakeryResourceLayout::buildSchema; Modules/Module.php class registry.