section
LayoutComponent ❌ Theme ✅ Options ✅ Content & Translations
To edit a section element, you need to edit the layout-component section and send a PATCH request on /widgets/layout-component/{layout-component-id} and specify the following options in the options property.
Element
Description
Component options
imageType
Image type (logo or banner).
string
saveOnClick
Whether to save consents immediately upon user interaction
boolean
contentAlign
Content alignment within section (left, center or right)
string
isCardClickable
Whether the whole card is clickable.
boolean
isSaveIndicatorVisible
Whether the the save indicator is visible.
boolean
PATCH https://api.didomi.io/widgets/layout-components/{layout_component_id}?organization_id=YOUR_ORG_ID&widget_id=YOUR_WIDGET_ID
{
"type": "section",
"organization_id": "YOUR_ORGANIZATION_ID",
"options": {
"title": {
"content": {
"en": "YOUR_SECTION_TITLE"
}
},
"logoWrapper": {
"style": {
"default": {
"width": "100%"
}
}
},
"logo": {
"src": "YOUR_SECTION_LOGO"
},
"card": {
"style": {
"default": {}
}
},
"purposeOptions": {
"title": {
"content": {
"en": "YOUR_PURPOSE_TITLE",
"fr": "VOTRE_TITRE_DE_FINALITE"
}
},
"description": {
"content": {
"en": "YOUR_PURPOSE_DESCRIPTION",
"fr": "DESC_FINALITE"
}
},
"noIcon": {
"src": "YOUR_NO_VALUE_ICON"
},
"noLabel": {
"content": {
"en": "YOUR_NO_VALUE_CONTENT",
"fr": "VALEUR_NON_CONTENU"
}
},
"yesIcon": {
"src": "YOUR_YES_VALUE_ICON"
},
"yesLabel": {
"content": {
"en": "YOUR_YES_VALUE_CONTENT",
"fr": "VALEUR_OUI_CONTENU"
}
}
},
"preferenceOptions": {
"title": {
"style": {
"default": {}
}
},
"description": {
"style": {
"default": {}
}
},
"preferenceValuesOptions": {
"label": {
"style": {
"default": {}
}
}
}
},
"saveIndicatorWrapper": {
"style": {
"default": {}
}
},
"imageType": "banner",
"saveOnClick": false,
"contentAlign": "left",
"isCardClickable": false,
"isSaveIndicatorVisible": false
}
}Last updated