The page builder

The page builder

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.

Opening the builder

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.

The canvas

Blocks

Blocks come from three layers:

  1. Managed blocks (category Interactions): Screen Flow, Custom LWC, iFrame, Chart, Sub Template. See Standard components.
  2. Org defined blocks from Portal_Block__mdt custom metadata, fetched at load. See Custom components.
  3. Standard 3B Portals and Tailwind blocks: basic elements (1, 2, 3 and 4 column rows plus 3/7, 7/3, 8/2 and 2/8 splits, text, image, video, map, link), a Custom Code block, and a large pre designed Tailwind section library (around fifty sections across hero, feature, content, header, footer, blog, cta, pricing, testimonial, team, gallery, statistic, step, contact, and ecommerce categories).

The Custom Code block

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.

Panels and buttons

The builder adds panel buttons for common actions:

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.

Traits and data binding

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.

Storage

The builder uses a custom 3B Portals storage adapter:

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.

Preview

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 AI copilot

The builder includes an optional AI copilot that generates and edits whole pages from a prompt. See The AI page builder.

Troubleshooting startup

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.