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


Outputs sections from another resource. Same PHP as PageBuilder. Set the source with resource_id.
Template or chunk. Uncached call.
| Parameter | Default | Description |
|---|---|---|
resource_id | 0 | Source ID. 0 = current resource |
section_types | empty | Section key filter |
return_values | 0 | JSON instead of HTML (same as PageBuilder) |
use_cache | 1 | HTML cache |
load_css | from setting | Frontend CSS |
wrap_page | like load_css | pb-page wrapper |
If no resource can be resolved, the response is an empty string, including when return_values=1. If the id exists but there is no PageBuilder record, return_values=1 returns { "plainText": "", "sections": [] }.
Snippet properties list only resource_id and section_types. There is no required mark on resource_id. Other parameters work like PageBuilder. A call without arguments does not fail.
[[!PageBuilderResource?
&resource_id=`15`
§ion_types=`faq`
]]{'!PageBuilderResource' | snippet : [
'resource_id' => 15,
'section_types' => 'faq'
]}