
PageBuilder
Visual section builder for MODX 3: draft and publish without overwriting resource content


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, via FetchIt (do not call from template; section chunk calls FetchIt):
| Snippet | Purpose |
|---|---|
| PageBuilderQuiz | Handler for quiz section |
| PageBuilderContactForm | Handler for contact_form section |
data_table section.For a block from another page (hero from home, FAQ from landing) use PageBuilderResource.
Quiz and lead form: add quiz / contact_form sections and install FetchIt. Direct handler snippet calls in the template 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.