Visual header, body, and footer composition screen.

* Drag-and-drop section ordering with automatic saving.
* Add existing reusable documents to regions.
* Remove placements without deleting documents.
* Create independent page-specific copies.
* Shared-document usage warnings.
* Document creation, duplication, deletion protection and filtering.
* Draft and published document states.
* Document and placement scheduling.
* Authenticated homepage preview.
* Draft sections displayed in preview with a clear draft marker.
* Content Composer added to the administration sidebar.
* Public rendering now respects:
    * Publication status
    * Future publication dates
    * Expiry dates
    * Placement start and end dates
    * Enabled state
* Original Saasland homepage remains as the fallback when no composition exists.
This commit is contained in:
Mark Gregory
2026-07-27 08:28:52 +01:00
parent 3a93d4eaea
commit bfac7f555a
15 changed files with 686 additions and 57 deletions
+22 -18
View File
@@ -1,33 +1,37 @@
# Content composition module
# Content Composer
This module separates public pages into reusable typed content documents placed in named regions.
The Content module provides reusable typed documents and ordered page regions.
## Install the baseline composition
## Phase 2 features
- Header, body and footer composition editor.
- Drag-and-drop ordering with server-side ownership validation.
- Add existing published or draft documents to a page.
- Remove a placement without deleting the reusable document.
- Create an independent page-specific draft copy.
- Shared-use warnings and deletion protection.
- Placement enable/disable and date scheduling.
- Content document creation, duplication, filtering and publishing controls.
- Authenticated Saasland homepage preview, including draft labels.
- Content Composer entry in the administration sidebar.
## Setup
```bash
php artisan migrate
php artisan content:install-saasland
```
Use `--force` to replace the existing `home` placements while retaining reusable documents.
Reset the seeded homepage composition when required:
```bash
php artisan content:install-saasland --force
```
## Administration
Administration:
After signing in, open:
- `/admin/content`
- `/admin/content/pages/home`
- `/admin/content/pages/home/preview`
- `/admin/content` for reusable content documents.
- `/admin/content/pages/home` for the homepage header/body/footer composition.
Documents contain structured JSON data and can be shared by several page placements. Placements own ordering, enabled state, scheduling, visibility and presentation metadata. The Saasland frontend falls back to its original hard-coded homepage until the migration and installer command have been run.
## Theme renderers
Saasland renderers are stored under:
`resources/themes/saasland/views/documents`
The renderer name is defined by each `content_types.renderer` value. Missing renderers fail safely through `content::documents.unsupported`.
The public theme remains backward-compatible: when no composition exists, the legacy Saasland homepage, header and footer are rendered.