Understanding Page Builder Content Types
Understanding Page Builder Content Types
~5 Min. Lesezeit Zuletzt aktualisiert am August 9, 2026
Widgets (chapters 55-57) give editors controlled, developer-defined access to code. Page Builder goes one step further: the visual page composer built into the admin since Magento 2.3, letting editors assemble entire pages by dragging individual building blocks - "content types" - onto a stage, with no WYSIWYG directive syntax at all.
Content types: the building blocks of Page Builder
Every block an editor can drag onto the Page Builder stage - text, heading, image, banner, row/column layout containers, products, an embedded CMS block, video, buttons, tabs, slider, map - is its own content type. Core content types ship as their own small modules (Magento_PageBuilder*); a custom content type registers itself the same way, via its own etc/pagebuilder/content_type.xml.
Master format: the actual persistence form
The most important architectural difference from widgets: a widget renders freshly from the {{widget}} directive on EVERY page view (chapter 55). Most Page Builder content types, by contrast, render only ONCE, in the admin, at save time - the result, the so-called "master format" HTML (with data-content-type/data-appearance/data-element attributes for later re-editing), is written directly into the CMS page's or block's content field. On the frontend that HTML is served largely as-is - only style/attribute processing still runs at request time through Magento\PageBuilder\Model\Render\Attributes, no re-execution of the actual content's PHP.
Achtung: That has an important practical consequence: most custom content types CANNOT show live, per-request data - like a per-customer points balance. Core content types that still need to be dynamic (the embedded CMS block, the product tile, personalized "dynamic blocks") therefore don't bake any real content in at all - their master format is itself just a {{widget type="..."}} placeholder directive, resolved only at request time by the very same widget filter from chapter 55. A custom content type CAN use the same trick, but is then, strictly speaking, a widget wearing a Page Builder costume. Chapter 61 picks this trade-off back up concretely.
A custom content type's files
New files in this block (chapters 59/60)
app/code/Mironsoft/Loyalty/
├── etc/pagebuilder/content_type.xml # Registrierung (Kapitel 59)
├── Block/PageBuilder/PointsBanner.php # Master-/Frontend-Render-Block (Kapitel 59)
├── view/frontend/templates/pagebuilder/points-banner/
│ └── default.phtml # Frontend-Template (Kapitel 59)
├── view/adminhtml/web/js/content-type/points-banner/
│ └── preview.js # Live-Vorschau-Komponente (Kapitel 60)
└── view/adminhtml/web/template/content-type/points-banner/
└── preview.html # Knockout-Vorschau-Template (Kapitel 60)etc/pagebuilder/content_type.xml- registration: name, label, menu section, icon, and the component paths for preview and master format.Block/PageBuilder/PointsBanner.php- block class for server-side master format generation at save time AND for the frontend output - the same block+template pair handles both roles.view/frontend/templates/pagebuilder/points-banner/default.phtml- the actual markup.view/adminhtml/web/js/content-type/points-banner/preview.jsplus its matching.htmltemplate - the live preview on the admin stage, completely independent of the PHP rendering (chapter 60).
Content type preview vs. widget preview
A widget has NO live preview in the WYSIWYG editor - until saved, the editor only shows a placeholder chip with the widget's label. A Page Builder content type, by contrast, renders immediately, editable, WYSIWYG-accurate right on the admin stage - that's Page Builder's actual value proposition, and exactly why a custom content type needs noticeably more files than a widget: the separate knockout preview component from chapter 60 simply doesn't exist for a widget.
Tipp: The exact shape of content_type.xml and the internal master format render route differ slightly between Magento minor versions. Before taking this module to production, it's worth checking vendor/magento/module-page-builder-banner/etc/pagebuilder/content_type.xml in your own installation - the built-in Banner content type is structurally closest to our Points Banner from chapter 59 (image/text/call-to-action), making it the most reliable source for details this tutorial deliberately simplifies.