Skip to content

Start building your next app or website — with AI, right in your browser.

Visit devdojo.com
Docs
Composition Pages

Sites 10 / 13

Composition Pages

Data-driven pages a non-developer can edit visually — reorder, add, and remove blocks without touching code — living alongside your hand-written .blade.php pages.

Composition pages

A DevDojo Sites page can be built two ways, and they live side by side:

  • File pages — a real resources/views/pages/*.blade.php file you write. Full control, version-controlled, developer territory.
  • Composition pages — the same page expressed as data: an ordered list of section blocks with their values. No file to edit — you arrange the page visually. This is the format a marketer or content editor can safely own.

Both render identically (real Blade through the same engine). The difference is who edits them and how.

Turning a site into composition mode

By default a site is in File mode and behaves exactly as always. To enable composition pages, open the site's Settings and switch Page management to Composition pages. (When you connect a Laravel app — see Connect a Laravel app — this happens automatically.)

Once in composition mode, the pages folder in the builder's file tree becomes a lego piece 🧱. Click it to open the page manager.

The page manager

The manager lists every page in your site:

  • Composition pages expand inline. Each shows its blocks — click a block to edit its fields right there, drag (or use the move buttons) to reorder, add a section, or delete one. Changes save instantly and the preview updates.
  • File pages appear as locked rows with a .blade.php badge. They're developer-owned code, so you don't edit them here — "Open in code" jumps to the file in Code mode.

From the manager you can:

  • + New page — create a fresh composition page at a route (e.g. /pricing). A route is served by exactly one source, so you can't create one where a file page already lives (and vice versa).
  • Adopt a file page → converts it into an editable composition page (the original .blade.php is retired). This is how you hand a page to a content editor.
  • Eject a composition page → converts it back into a resources/views/pages/{route}.blade.php file you own in code. Nothing is lost; it's the exact same page as Blade.

Adopt and eject are lossless round-trips — the same blocks, the same output.

Editing the raw record

Every composition page also has an "Edit JSON code" button. It opens the page's underlying record — its layout, meta, and block list — as JSON you can edit directly. Saving validates the record (a malformed block or an unsafe value is rejected with a clear message), so you can hand-tune a page without breaking it.

The canvas still works

Composition pages render on the canvas just like file pages, so everything in The Builder — selecting a section, editing its fields in the options panel, the section library — works on them too. The page manager is simply the fastest way to see and rearrange a whole site's pages at once.

Publishing

Composition pages publish, export, and serve exactly like file pages — they're materialized into real Blade at render time, so your live site, your export ZIP, and a connected Laravel app all get the identical result.

© 2026 DevDojo Edit this page