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


Version: Free.
A field for a PDF, an archive, or another file, not only a picture. After save, the data includes the file name, extension, size, and URL. Files are processed the same way as image.
In the chunk use {$file.url}, not a file path. Photos alone often fit image.
{
"name": "pdf",
"type": "file",
"label": "File",
"description": "PDF or another document",
"tab": "Content",
"width": 100,
"active": true
}Media object: url, size, title, name, filename, extension, type, and more. A legacy string on read is wrapped as { url }.
Key pdf in the section data after save enrich (MediaFieldEnricher):
{
"pdf": {
"url": "assets/files/catalog.pdf",
"id": 34,
"path": "assets/files/",
"filename": "catalog.pdf",
"extension": "pdf",
"name": "catalog",
"title": "catalog.pdf",
"size": 1048576,
"type": "pdf"
}
}{ url } on read.<a href="[[+pdf.url]]" download="[[+pdf.title]]">[[+pdf.title]]</a><a href="{$pdf.url|escape}" download="{$pdf.title|escape}">{$pdf.title|pb_text}</a>For fields with name that are stored in the section data:
| Key | Type | Role | CMP |
|---|---|---|---|
tab | string | Group subtitle in the inspector | yes |
width | 25–100 | Field width as % of the row (flex) | yes |
description | string | Hint under the label | yes |
default | any | Initial value for a new section | yes |
active | bool | false hides the field in the inspector | yes |
required | bool | Required on publish (draft still saves) | yes |
See fields overview.