OneTrust Privacy Policy
Renders the OneTrust privacy policy content block. Pulls privacy policy sections from the OneTrust platform and displays them as formatted HTML. Supports section filtering via the OneTrust domain configuration.
The example below renders the OneTrust Privacy Policy component with a sample notice ID. The rendering loads the OneTrust privacy notice script and initializes the notice container. In production, the Notice field holds the unique OneTrust notice identifier and the Settings field holds the JSON configuration string.
Usage Notes
- The OneTrust Privacy Policy rendering outputs a container
divwith a uniqueidattribute based on theNoticefield value, followed by two injected<script>tags in theHeadTopsection. - The first script loads the OneTrust privacy-notice SDK from
https://privacyportal-uk-cdn.onetrust.com/privacy-notice-scripts/otnotice-1.0.min.jsand passes theSettingsfield value as its settings attribute. - The second script uses
OneTrust.NoticeApi.Initializedto wait for the SDK to load, then callsLoadNoticeswith the constructed JSON URL for the given notice ID. - The rendering does not have its own rendering parameters template. It inherits standard section parameters from the parent
bs-sectionwrapper only. - The datasource is based on the OneTrust Privacy Policy template (
Feature/SFS6/Components/OneTrust Privacy Policy) which has two text fields:NoticeandSettings. - Datasource items should be stored under
/sitecore/content/Shared Content/Markel/OneTrust Privacy Policiesas configured in the rendering's Datasource Location. - The privacy notice content is rendered client-side by the OneTrust SDK; server-side output is only the container element and script references.
Control Properties
Standard Values / Defaults
The OneTrust Privacy Policy rendering does not define its own rendering parameters template. It relies solely on the standard parameters inherited from the parent bs-section wrapper (grid padding, borders, color, etc.).
| Parameter | Default Value |
|---|---|
| No component-specific rendering parameters. Only inherited section parameters apply. | |
Rendering Registration
| Property | Value |
|---|---|
| Rendering Path | /sitecore/layout/Renderings/Feature/MklComponents/OneTrust/OneTrust Privacy Policy |
| Component Name | OneTrustPrivacyPolicy |
| Datasource Template | /sitecore/templates/Feature/SFS6/Components/OneTrust Privacy Policy |
| Datasource Location | /sitecore/content/Shared Content/Markel/OneTrust Privacy Policies |
Template Properties
The OneTrust Privacy Policy datasource uses the OneTrust Privacy Policy template (Feature/SFS6/Components/OneTrust Privacy Policy).
| Field | Type | Description |
|---|---|---|
| Notice | Single-Line Text | The unique OneTrust notice identifier (GUID/slug). Used to construct the container element id attribute and the JSON URL for loading the privacy notice content. |
| Settings | Single-Line Text | JSON configuration string passed to the OneTrust privacy-notice script via the settings attribute. Controls display options such as language and formatting. |
Note: Both fields are rendered as plain text values in the view. The Notice value is interpolated into the container id (otnotice-{Notice}) and the JSON URL path. The Settings value is output directly as the script element's settings attribute.