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.

ElementDescriptionComponent options

logo

Logo of a section (purpose card)

logoWrapper

Logo container.

title

Section title.

purposeOptions

Purpose options object

preferenceOptions

Preference options object

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": {
        "logo": {
            "src": "YOUR_SECTION_LOGO"
        },
        "logoWrapper": {
            "style": {
                "default": {
                    "width": "100%"
                }
            } 
        },
        "title": {
            "content": {
                "en": "YOUR_SECTION_TITLE"
            }
        },
        "purposeOptions": {
            "title": {
                "content": {
                    "en": "YOUR_PURPOSE_TITLE",
                    "fr": "VOTRE_TITRE_DE_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
                }
            },
            "description": {
                "content": {
                    "en": "YOUR_PURPOSE_DESCRIPTION",
                    "fr": "DESC_FINALITE"
                }
            }
        },
        "preferenceOptions": {
            {
                "title": {
                  "style": {
                        "default": {}
                  }
                },
                "description": {
                  "style": {
                        "default": {}
                  }
                },
                "preferenceValuesOptions": {
                    "label": {
                        "default": {}
                    }
                }
            }        
        }
    }
}

Last updated