
- MODX 3
- PHP 8.2
- Vue 3


Output snippets, plus form handlers in Pro. Section chunk: Free pagebuilder_{key}, Pro pagebuilderpro_{key} (data_table → pagebuilder_data_table). Chunks have no namespace: the prefix is the package name. The pagebuilder_data_table chunk is installed with the package.
| Snippet | Purpose |
|---|---|
| PageBuilder | HTML of published sections for current or given resource |
| PageBuilderResource | Sections from another resource (resource_id, 0 = current resource) |
| 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 handlers. 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.
| 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? &resource_id=`[[*id]]` &table_key=`prices`]] | {'!PageBuilderTableRows' | snippet : ['resource_id' => $_modx->resource.id, '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.