Aller au contenu

Page Builder

Ce contenu n'est pas encore disponible en français et s'affiche en anglais.

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:

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
  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.