Layout Builder: overview
An editor opens a page and drags a call to action into the spot where it should go. Layout Builder, the page builder, puts pages together from widgets. A widget is a piece of content with its own settings, such as a call to action or an image with a headline. Capell’s widget packages, such as a countdown or a slideshow, are placed on pages through it.
Inside a page there is a content editor, where you change text and images in place, and a layout view, where you add, move and remove widgets. Your permissions decide which you get, and a role that edits layouts may need access to Widgets as well. Widget changes, including adding and removing, can be undone before you Save Layout. Edits to a widget’s own content save at once. Several pages can share one layout, and a shared layout links to the pages that use it, so you can see what an edit will touch.
To swap a widget across many layouts, choose Move or replace widgets on the Layouts list. Runs that reach 50 layouts or 250 pages wait for background jobs, which your developer or host keeps running, and smaller runs apply at once. You see a preview first, and nothing changes until you approve it.
What it does
Section titled “What it does”Layout Builder assembles public pages from reusable Widgets arranged in named Layout containers. Widgets hold translated content, media, visibility dates, and presentation settings; a Layout controls where each widget appears. A single Layout can be shared by several pages, so a structural edit can have a wider effect than the page currently open.
When to choose Layout Builder
Section titled “When to choose Layout Builder”Use Layout Builder when the changing thing is page composition: which widgets appear in named areas and how those areas are arranged. Use Content Sections when editors need to maintain a reusable, published section selected by several pages. Use Structured Content Library for typed records such as testimonials, team members, services, and FAQs that pages can reuse. Those packages can be composed through Layout Builder. For a site with only a few fixed templates and no need for widget composition, the application’s existing Laravel templates may be sufficient.
Installation and setup
Section titled “Installation and setup”Layout Builder requires Admin, Block Library, Core, and Frontend. capell:layout-builder-install publishes/runs the package migrations and publishes the admin assets. The application’s package setup lifecycle then creates the widget blueprints, default widget catalogue, content types, and starter layouts; there is no separate capell:layout-builder-setup command. If the screens exist but standard widget types or layouts are missing, check that both install and package setup completed rather than creating replacement records by hand.
The default editor mode is Content first. Integrators can change it with CAPELL_LAYOUT_BUILDER_DEFAULT_EDITOR_MODE=layout_first; users are still limited to the mode their permissions allow. Other runtime options control lazy builder loading, preview layout matching, empty-widget rendering, and public widget snapshot retention.
Screens and access
Section titled “Screens and access”- Websites -> Widgets creates and edits reusable widget records and shows which layouts use them.
- Websites -> Layouts manages layout records, container/widget assignments, generated previews, and guided bulk changes.
- Websites -> Layout Presets is a list-only catalogue showing each preset’s copy/linked mode, category, revision, and usage count. Create and insert presets from the Layout Builder itself.
Editors receive view and content-edit access by default. Structural layout changes, preset management, replication/deletion, reordering, and bulk mutation require the corresponding Layout permissions. The builder also checks the selected page, Layout, Site, and preset policy; an assigned-site administrator cannot apply a preset from another site. A global administrator may work across sites when their permissions allow it.
Edit and save safely
Section titled “Edit and save safely”The Add widget picker shows uploaded/generated images or package-declared previews, with a labelled icon when an image is unavailable. Usage counts remain on the Widgets management screen.
Use Content first for widget content and assets without rearranging the page. Use Layout first to add, remove, move, resize, or configure containers and widget occurrences. Before changing a shared Layout, follow the pages-using-this-layout link and review the full impact.
Changes remain unsaved until Save layout succeeds. Undo and redo cover the current unsaved mutation history and are cleared after a successful save or reload. Saving is blocked when a Layout references an unknown widget; responsive-width diagnostics are warnings. If another editor saved the Layout after you opened it, your save is rejected and the builder reloads the current record. Reapply the intended change to the refreshed Layout instead of assuming your earlier state was stored.
Widget status and Visible from/Visible until dates are evaluated when public widget records are loaded; they do not need a publishing scheduler. A disabled, future, expired, inaccessible, untranslated, or empty widget may therefore be absent even though its key is still present in the Layout. Verify the exact Site, language, page, and theme after saving.
Presets and linked updates
Section titled “Presets and linked updates”A copy preset is a site-scoped snapshot. The normal Save as preset flow stores layout structure and safe presentation metadata, not the widget’s live editorial content, then inserts an independent copy later. Preset snapshots remove admin/editor identifiers, signed URLs, model identifiers, permissions, and other unsafe metadata before storage or use.
A linked preset keeps inserted containers connected to its source. Updating a linked source increments its revision and queues propagation to the other linked usages. Run a queue worker for this workflow. The sync job tries three times and serialises work per preset. It will not overwrite a Layout changed since its usage record was captured, remove a detached link, or replace a container when page-scoped assets would be orphaned; the run completes with conflicts instead.
The Layout Presets screen does not expose a conflict editor. Resolve the affected Layout or asset conflict, then queue recovery with layout-builder:resync-preset <preset-id-or-key>. Detach a container first when it should stop receiving linked changes.
Guided bulk changes
Section titled “Guided bulk changes”The Layouts screen can preview moving, removing, swapping, or relocating widget occurrences across layouts filtered by Site, theme, group, key, status, and required widget. Review the stored preview before approval. Apply rechecks the Layout hash and skips records that changed after preview, producing a partial result instead of overwriting newer edits.
Runs targeting at least 50 Layouts or 250 pages are queued; smaller runs apply synchronously. A queue worker is therefore required for larger changes, and the queued user’s Bulk mutate layouts permission is checked again when the job runs. Preview can block an ambiguous default-asset move. Removing a widget can either leave page-scoped assets unused with a warning or delete them during apply; a later Layout revert does not recreate deleted assets.
For scripted recovery, capell:layouts:bulk-change supports preview, approve/queue, and revert by run UUID. Revert only restores Layouts that still match the applied result; later edits are reported as drift and left untouched. Completed, blocked, and failed run snapshots are retained for 90 days by default.
Public rendering and operations
Section titled “Public rendering and operations”Public rendering preloads enabled, in-window widgets and passes a restricted payload to Blade. Anonymous HTML must not contain authoring selectors, permissions, model identifiers, signed editor URLs, or other admin metadata. Interactive/lazy widget extensions use encrypted, Site/language-bound snapshots; saving or deleting the owning page rebuilds or revokes them. A missing or invalid snapshot fails closed for the interaction rather than revealing stored state.
Public fragment responses require revalidation on every request, omit session cookies, and are marked noindex. This ensures changes to page access are checked before a fragment is served.
Keep the Laravel scheduler running. It prunes expired/revoked public widget snapshots at 02:30 and terminal bulk-change runs daily, using overlap and single-server locks. Without it, normal page rendering continues but obsolete operational records accumulate.
Widget translations, layout/preset JSON, media relationships, user stamps, and activity history live in normal application storage; only public interaction snapshot payloads are encrypted by this package. Layout Builder does not register a Privacy Centre exporter or eraser, so do not place subject-request data in generic widget fields without an owning export, retention, and erasure process.
For how to use Layout Builder, see the admin guide. For developers: see the README.