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


Version: Pro.
An address and coordinates for a map section. After save, the field stores an embed URL and a link that opens the map. If the field type is map, or the name contains "map", the same values are also stored as map_* keys.
Several points use a repeater: latitude and longitude as text fields, or your own row schema. Use the saved embed URL. Do not build the link by hand.
{
"name": "location",
"type": "map",
"label": "Map",
"tab": "Content",
"width": 100,
"active": true
}Object { lat, lng, zoom, provider }; enrich adds embed_url on the object and flat map_embed_url.
Key location in the section data after save enrich (MapEmbedResolver):
{
"location": {
"lat": 55.751244,
"lng": 37.618423,
"zoom": 14,
"provider": "yandex",
"embed_url": "https://yandex.ru/map-widget/v1/?ll=37.618423%2C55.751244&z=14&pt=37.618423%2C55.751244%2Cpm2rdm&l=map",
"watch_url": "https://yandex.ru/maps/?ll=37.618423%2C55.751244&z=14&pt=37.618423%2C55.751244%2Cpm2rdm&l=map"
},
"map_embed_url": "https://yandex.ru/map-widget/v1/?ll=37.618423%2C55.751244&z=14&pt=37.618423%2C55.751244%2Cpm2rdm&l=map",
"map_provider": "yandex",
"map_watch_url": "https://yandex.ru/maps/?ll=37.618423%2C55.751244&z=14&pt=37.618423%2C55.751244%2Cpm2rdm&l=map"
}map_embed_url, map_provider, and map_watch_url duplicate the embed of the first map field (priority for key location).yandex; osm is OpenStreetMap.<iframe src="[[+location.embed_url]]" title="Map"></iframe><iframe src="{$location.embed_url|default($map_embed_url)|escape}" title="Map"></iframe>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 |
embed_url, watch_url, and flat map_* to section.data.See fields overview.