Zum Inhalt springen

Page Builder

Dieser Inhalt ist noch nicht auf Deutsch verfügbar und wird auf Englisch angezeigt.

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.

Statamic page entry
-> resources/views/entries/pages.blade.php
-> App\PageBuilder\SectionDispatcher
-> config/page_builder.php registry
-> Blade section view or Livewire section class

resources/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 from resources/views/sections/
  • livewire: mount the configured Livewire component from app/Livewire/Sections/
  • unknown: render resources/views/sections/_unknown.blade.php and log a warning

App\PageBuilder\SectionDispatcher does three things:

  1. Normalizes Statamic Value and Values objects into plain arrays.
  2. Looks up the section type in config/page_builder.php.
  3. 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.

config/page_builder.php is the source of truth for section type names.

Blade-rendered section types:

TypeView
annotated_textsections.annotated_text
archive_postssections.archive_posts
archive_publicationssections.archive_publications
buttonlistsections.buttonlist
buttons_grid_2xsections.buttons_grid_2x
call_to_actionsections.call_to_action
candidatessections.candidates
cardlistsections.cardlist
donation_payrexxsections.donation_payrexx
donation_raise_nowsections.donation_raise_now
event_listsections.event_list
free_textsections.free_text
introsections.intro
media_kitsections.media_kit
publicationssections.publications
sign_initiativesections.sign_initiative
timelinesections.timeline
valuessections.values
free_formsections.free_form

Livewire-rendered section types:

TypeClass
google_event_listApp\Livewire\Sections\GoogleEventListSection
mapApp\Livewire\Sections\MapSection
memberlistApp\Livewire\Sections\MemberlistSection
post_collectionApp\Livewire\Sections\PostCollectionSection
votesApp\Livewire\Sections\VotesSection
member_registrationApp\Livewire\Sections\MemberRegistrationSection
media_registrationApp\Livewire\Sections\MediaRegistrationSection
newsletter_registrationApp\Livewire\Sections\NewsletterRegistrationSection
  1. Add the section set to the page blueprint in resources/blueprints/collections/pages/page.yaml.
  2. Add a renderer entry to config/page_builder.php.
  3. Create either a Blade view under resources/views/sections/ or a Livewire component under app/Livewire/Sections/.
  4. Add focused tests for dispatcher resolution and any dynamic behaviour.
  5. Update the content reference once the section is stable.