Page Builder
Pages use a Statamic sections replicator. Each section stores a type value and a payload of fields. Rendering is driven by a small dispatcher instead of branching through a large template.
Request Flow
Section titled “Request Flow”Statamic page entry -> resources/views/entries/pages.blade.php -> App\PageBuilder\SectionDispatcher -> config/page_builder.php registry -> Blade section view or Livewire section classresources/views/entries/pages.blade.php gets the entry’s sections, normalizes each section, resolves it, and renders one of three outcomes:
blade: include the configured Blade view fromresources/views/sections/livewire: mount the configured Livewire component fromapp/Livewire/Sections/unknown: renderresources/views/sections/_unknown.blade.phpand log a warning
Dispatcher Responsibilities
Section titled “Dispatcher Responsibilities”App\PageBuilder\SectionDispatcher does three things:
- Normalizes Statamic
ValueandValuesobjects into plain arrays. - Looks up the section
typeinconfig/page_builder.php. - Verifies that the configured Blade view or Livewire class exists before rendering.
Unknown or invalid sections are not allowed to crash the whole page. They render a fallback and log enough context to debug the entry, site, section type, and section index.
Section Registry
Section titled “Section Registry”config/page_builder.php is the source of truth for section type names.
Blade-rendered section types:
| Type | View |
|---|---|
annotated_text |
sections.annotated_text |
archive_posts |
sections.archive_posts |
archive_publications |
sections.archive_publications |
buttonlist |
sections.buttonlist |
buttons_grid_2x |
sections.buttons_grid_2x |
call_to_action |
sections.call_to_action |
candidates |
sections.candidates |
cardlist |
sections.cardlist |
donation_payrexx |
sections.donation_payrexx |
donation_raise_now |
sections.donation_raise_now |
event_list |
sections.event_list |
free_text |
sections.free_text |
intro |
sections.intro |
media_kit |
sections.media_kit |
publications |
sections.publications |
sign_initiative |
sections.sign_initiative |
timeline |
sections.timeline |
values |
sections.values |
free_form |
sections.free_form |
Livewire-rendered section types:
| Type | Class |
|---|---|
google_event_list |
App\Livewire\Sections\GoogleEventListSection |
map |
App\Livewire\Sections\MapSection |
memberlist |
App\Livewire\Sections\MemberlistSection |
post_collection |
App\Livewire\Sections\PostCollectionSection |
votes |
App\Livewire\Sections\VotesSection |
member_registration |
App\Livewire\Sections\MemberRegistrationSection |
media_registration |
App\Livewire\Sections\MediaRegistrationSection |
newsletter_registration |
App\Livewire\Sections\NewsletterRegistrationSection |
Adding a Section Type
Section titled “Adding a Section Type”- Add the section set to the page blueprint in
resources/blueprints/collections/pages/page.yaml. - Add a renderer entry to
config/page_builder.php. - Create either a Blade view under
resources/views/sections/or a Livewire component underapp/Livewire/Sections/. - Add focused tests for dispatcher resolution and any dynamic behaviour.
- Update the content reference once the section is stable.
