Display CMS legal pages
Use the legal-pages collection for published terms, privacy notices, and similar documents. Each document has a slug and localized title and rich-text body. The CMS API returns the published content for the requested tenant, environment, and locale.
Fetch a page by slug
Use getLegalPage() when the app knows the page slug. The legal-pages collection is open by default, so a signed-out screen can read it with the tenant code.
const page = await client.getLegalPage('terms-and-conditions', {
tenantCode,
environment: 'staging',
locale: 'de-DE',
allowSignedOut: true,
});
renderLegalPage({ title: page.title, body: page.body });
The example's client, tenantCode, and renderLegalPage() are application-provided. Use the slug assigned in the CMS document. The SDK maps regional locales such as de-DE to the CMS's bare locale codes. See Use CMS with i18next for React integration.
Render rich text safely
The body field is the CMS editor's JSON structure, not HTML. Render it with a rich-text renderer that supports the CMS document format. Do not insert it as raw HTML. If the app needs a text-only preview, derive it from the supported node types rather than treating the body object as a string.
Publish and refresh legal content
Only published documents are returned. A draft and a missing item both produce a 404. A document published in dev is not visible to an app reading staging or prod; keep the CMS environment aligned with the app's API environment.
Publishing the terms-and-conditions legal page can cause users in the project to be asked to accept the terms again at their next sign-in. Review the content and expected acceptance behavior before publishing an update to that slug.
CMS responses are cached for about 60 seconds and may remain stale for longer behind a CDN. See the platform's CMS caching notes.