Publishing pages

Publishing pages

Saving is publishing

3B Portals has no separate draft and published state. Saving a page in the builder is publishing it. When you click Save, the builder writes two Salesforce Files against the Page record:

The compiled file includes the font links, the current HTML, the CSS, and any page JavaScript. Both files are gzip plus base64 compressed and stored as ContentVersions linked to the Page record. The moment Template_html.b3p is overwritten, the live portal serves the new content, subject to caching.

Standard component settings are saved alongside the templates in component_config.json. Each save creates file versions. In Version history, loading an earlier version changes only the builder canvas; selecting Restore this version or Save publishes it as a new version. Page settings such as name and guest access are not versioned.

The builder rejects saves when the two compressed, base64-encoded template files together exceed 3,000,000 characters. Compress embedded images or link to them by URL before retrying.

Caching is the publish boundary

The runtime caches a decompressed page template for the Web Portal's Cache_Max_Age_Minutes__c (120 minutes when blank). So after a save, a page can keep serving the previous version for the configured cache window. To make changes appear immediately, check Disable_Caching__c on the Page record, which bypasses the cache for that page. Clearing the browser session also clears the local template cache.

The runtime only reads the compiled file

The runtime portal resolves the page through Apex b3p.Portal action getPages (or bootstrap on the first load), then reads only Template_html.b3p through Apex b3p.Shared action getFileByName, which returns the file details and its body in a single call for files up to 3 MB. Larger files use a separate content download. The template is decompressed into the portal, page, css, js, and html. The editable Template.b3p is never served to end users.

The portalPublisher component (a Lightning web component on the Salesforce side) is a link generator, not a publish action. Backed by Apex Publisher, it lets you:

  1. Pick a target site (any active Experience site, or the internal org URL).
  2. Optionally pick a Contact, which mints a magic link token for that Contact so the link opens pre authenticated.
  3. Build a URL of the form <site>/<portalPage>#<recordName>?sessionKey=...&recordId=....

This is how you hand someone a working link to a page rendered for a specific record and, optionally, a specific user. See Magic links and session keys.

No deployment needed

Publishing a page is a data operation and needs no deployment.

Publish checklist

To open a portal as a specific Contact, add the Login As quick action or Portal Login As component to Contact. See Logging in as a Contact.