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


Result: the type shows up in the Blocks catalog. JSON shape and chunk paths are in section definition.
core/components/pagebuilder/sections/. A package upgrade overwrites that folder.chunk field.pbOnRegisterSectionDefinitions and call registerFromFile.<?php
switch ($modx->event->name) {
case 'pbOnRegisterSectionDefinitions':
/** @var \PageBuilder\Section\SectionRegistry $registry */
$registry = $modx->event->params['registry'];
$registry->registerFromFile($modx->getOption('core_path') . 'components/mypackage/sections/custom.json');
break;
}A key that contains _, or category: dev, stays out of the production catalog. SectionRequirementChecker evaluates requires.
Create the type in the control panel through mgr/sectiontype/*. The row lives in pb_section_types. A PageBuilder upgrade does not overwrite those rows.
Check: the key is visible in the catalog on the Sections tab. Rollback: hide the type in the panel, or remove registerFromFile.