
- MODX 3
- PHP 8.2
- Vue 3


Place the PageBuilder snippet in the template or content field. Use an uncached call:
[[!PageBuilder]]{'!PageBuilder' | snippet}Published sections render through Fenom chunks in core/components/pagebuilder/elements/chunks/. The chunk name matches the chunk field in the type JSON: pagebuilder_hero, pagebuilder_cta; Pro uses pagebuilderpro_{key}. FenomSectionRenderer buffers chunk output: a FetchIt or Fenom exception does not leave truncated HTML on the page.
By default the snippet registers:
pagebuilder-sections.css for base Free section stylespagebuilder-sections.js with Pro and interactive sections (tabs, carousel)Disable globally: pagebuilder_load_frontend_css = 0. Per call: &load_css=0``.
Page wrapper <div class="pb-page"> is controlled by wrap_page (defaults to the same as load_css).
Tokens, BEM, and Fenom shell: Design system.
use_cache=1 (default) caches final HTML in MODX. After publishing sections, clear site cache or call with use_cache=0 temporarily.
Events pbOnBeforeRenderDocument and pbOnBeforeRenderSection run only on cache miss (when HTML is not cached yet).
Parameter section_types limits output to listed keys:
[[!PageBuilder? §ion_types=`hero,cta`]]{'!PageBuilder' | snippet : ['section_types' => 'hero,cta']}Useful for partial blocks in different template areas.
return_values=1 returns JSON with extracted field values (plainText, sections structure). For headless or custom templating. Fires pbOnGetValues.
In section settings you can set:
contexts: MODX context keys (current request context)utm: UTM rules from $_SESSION['utm'] after PageBuilderUtmSessionWith Pro and capability conditions, add settings.conditions (loggedIn, guest, context, GET params, and more). Checked via SectionVisibility and event pbOnCheckSectionVisibility.
The section is omitted from HTML when a rule fails.
In the manager these blocks open from the Visibility dialog (pagebuilder_inspector_visibility_enabled). See Workflow.
With pagebuilder_responsive_apply=manual (default), the site gets one breakpoint value: ?pb_bp= or pagebuilder_default_breakpoint.
With css, all values go into HTML. Pro render wraps them in <span class="pb-rv"> with data-pb-bp; media-query CSS is injected automatically. In chunks for those fields:
{$title|pb_text}pb_text passes through .pb-rv markup and escapes plain text. Do not swap it for |escape or CSS mode breaks.
Field schema and JSON: Fields overview → responsive. Settings: System settings → Responsive.
The public site shows published content only. View drafts in the manager (Preview button) or via:
{assets_url}components/pagebuilder/preview.php
Token is signed with pagebuilder_preview_secret. The iframe loads template CSS (pagebuilder_preview_include_template_css) and URLs from pagebuilder_preview_css_urls.
pbOnBeforeRenderSection.A plugin can replace a section before chunk render via SectionRenderPipeline::replaceSection().