The builder is a 3B Portals based visual editor delivered as the PortalBuilder static resource and hosted on PortalBuilder.page. Open it from the Builder tab on a Web Portal record, or from the Builder tab or button on a Page__c record, which loads /apex/PortalBuilder?id=<pageId>. Either way the builder lists every page of the Web Portal so you can switch between them. See Page manager and version history.
The host page passes the Page record id and the configured AI and Google Fonts keys into the x-builder component. The builder loads that page's editable model (Template.b3p) and renders it in a live canvas.
Tailwind static resource), so utility classes render live.btn btn-primary, card, and hero render live.w-1/2, bg-base-200/60) work as 3B Portals selectors.Blocks come from three layers:
Portal_Block__mdt custom metadata, fetched at load. See Custom components.Drop the Custom Code block (Basic category) where you want raw HTML. A code modal opens; paste your markup and press Insert. The code is added to the page exactly as written, with no wrapper element and no extra styling, and from then on it is ordinary page content: select, style and move the resulting elements like anything else, or edit them through the HTML editor. Closing the modal without inserting removes the drop. Script tags are kept in the saved page but do not run inside the builder canvas.
The builder adds panel buttons for common actions:
</>). Opens the HTML editor.The </> button opens a CodeMirror based editor showing the current HTML plus a trailing <style> block of the current CSS. Edit the source and click Save Changes to re-parse it back into components. This is the fastest way to paste in existing markup or make precise edits.
The properties (trait) panel edits each component's attributes. Trait values can be static or merge tags. The builder provides a key value trait type for parameter lists (used by Screen Flow, Custom LWC, and custom components) whose value placeholder demonstrates the merge syntax, for example {{contactUser.Id}}. Conditional display is no longer a trait: select a component and click the eye icon on its toolbar to open the Visibility modal, which sets component-visibility and hide-if, lists the merge variables and tests the rule against a record. See conditional display.
The builder uses a custom 3B Portals storage adapter:
Template.b3p file, decompresses it, and rebuilds the editor model.Template.b3p (the editable model) and Template_html.b3p (the compiled html, css, js the runtime serves). Both are gzip plus base64 compressed. Saving is publishing. See Publishing pages.Every save also versions component_config.json, which holds standard component settings. Version history restores the editable template with its corresponding component configuration; saving publishes the restored content as a new version.
The two compressed, base64-encoded template files together must not exceed 3,000,000 characters. The builder refuses larger saves and asks you to compress embedded images or link to them by URL.
Setting the Web Portal Emulated_Contact__c lets Preview render the page as that Contact, so merge tags and conditional display resolve against real data.
The builder includes an optional AI copilot that generates and edits whole pages from a prompt. See The AI page builder.
If the builder remains on its loading state when opening a page that already contains configurable standard components, confirm that the org has the latest PortalBuilder static resource. Older builds could stop while restoring those components before the editor canvas was ready. The current build restores their saved configuration during startup and becomes interactive normally.