
PageBuilder
Visual section builder for MODX 3: draft and publish without overwriting resource content
- MODX 3
- PHP 8.2
- Vue 3


The package ships output snippets and (in Pro) form handlers. Namespace for chunks and sections: pagebuilder.
| Snippet | Purpose |
|---|---|
| PageBuilder | HTML of published sections for current or given resource |
| PageBuilderResource | Sections from another resource (resource_id required) |
| PageBuilderSitemap | XML sitemap for pages with published sections |
| PageBuilderUtmSession | UTM from query string into session for section visibility rules |
| PageBuilderUtmUrl | UTM from control panel registry appended to arbitrary URL |
| PageBuilderTableRows | Resource table rows (JSON or chunk) |
Pro. Do not call these from a template. The section chunk calls PageBuilderFetchIt:
| Snippet | Purpose |
|---|---|
| PageBuilderQuiz | Handler for quiz section |
| PageBuilderContactForm | Handler for contact_form section |
| PageBuilderFormBuilder | Handler for form_builder section |
| PageBuilderFetchIt | Renders the form through Fenom. The chunk passes the handler in snippet |
data_table section.For a block from another page (hero from home, FAQ from landing) use PageBuilderResource.
Quiz, lead form, and form builder: add the quiz, contact_form, or form_builder section and install FetchIt. The chunk calls PageBuilderFetchIt, not the handler directly. Direct template calls are not needed.
| Purpose | MODX | Fenom |
|---|---|---|
| Page sections | [[!PageBuilder]] | {'!PageBuilder' | snippet} |
| Filter sections | [[!PageBuilder? §ion_types=hero,cta]] | {'!PageBuilder' | snippet : ['section_types' => 'hero,cta']} |
| Another resource | [[!PageBuilderResource? &resource_id=42]] | {'!PageBuilderResource' | snippet : ['resource_id' => 42]} |
| JSON for SEO | [[!PageBuilder? &return_values=1]] | {'!PageBuilder' | snippet : ['return_values' => 1]} |
| Sitemap | [[!PageBuilderSitemap]] | {'!PageBuilderSitemap' | snippet} |
| UTM to session | [[!PageBuilderUtmSession]] | {'!PageBuilderUtmSession' | snippet} |
| URL with UTM | [[!PageBuilderUtmUrl? &url=/contacts/]] | {'!PageBuilderUtmUrl' | snippet : ['url' => '/contacts/']} |
| Table rows | [[!PageBuilderTableRows? &table_key=prices]] | {'!PageBuilderTableRows' | snippet : ['table_key' => 'prices']} |
Call PageBuilder and PageBuilderResource uncached ([[!...]] or {'!...' | snippet}). Otherwise MODX may serve HTML without a fresh publish.
PageBuilderUtmSession is also uncached: the session is filled in the same HTTP request as the UTM link visit.