From version 10.3, portal pages are merged on the server. The browser sends only a page ID, an optional context record ID, and its session key. Apex resolves the published page template, works out which fields and child relationships that template references, loads the data, substitutes every merge tag and repeat section, and returns the finished HTML.
This replaces the earlier browser-side merge. Conditional display (hide-if and component-visibility) is unchanged. It stays in the browser and runs on the merged output at render time. See Conditional display.
The merge tags on a page decide which fields are queried. The template is read from the published page file (Template_html.b3p on the Page record), never from the request, so a page returns only the fields its author placed on it. The template is the contract, and the template lives on the server.
filter: and sort: directives are read from the published template.The runtime sends:
| Parameter | Required | Meaning |
|---|---|---|
pageId |
Yes | The Page record to merge |
recordId |
No | Context record for record.* tags. Defaults to the session contact |
sessionKey |
No | The portal session key |
The response contains the merged html, the page css and js, and the model used for the merge. The model is still exposed to page JavaScript as window.contextData, so custom page scripts keep working.
record.* data is loaded only when the session key is valid. Without a session, a guest-accessible page still renders with record tags empty. This matches the legacy behaviour.recordId is supplied.sort: directive with its own LIMIT says otherwise. Nested repeats resolve up to three levels deep.sort: and filter: directives apply only to that block.{{record.AccountId}}) and through a relationship ({{record.Account.OwnerId}}).hide-if attributes come back merged but unevaluated. Merge tags inside the attribute value are substituted, then the browser evaluates the resulting condition at render time as before.If the server merge fails, the runtime falls back to the legacy browser-side merge so pages keep rendering during an upgrade. That fallback stays available until you turn it off.
After verifying all portals on 10.3, enable Disable Legacy Data Loader in Setup under Custom Settings, Portal. Only the server merge then loads page data. This is the recommended state for every production installation.
If a page misbehaves with the switch enabled, turn it off, test the page again, and report the affected template so the server merge can be corrected.
{{#record.Account.Opportunities}}, is not resolved and renders nothing.{{> name}}) are not supported and render nothing, matching the legacy behaviour.