Skip to content

Widgets

js.sevestre edited this page Mar 23, 2020 · 2 revisions

Common properties

{
"feedKeys": [], # if you need to restrict widget access  to this feed id list
"properties": {
    "style": { 
    },
    "id": "identifier set in front > style > advance",
    "class": "class set in front > style > advance",
    # here will be placed specific widget properties
},
"type": "widget",
"uuid": "ed1330ac-...",
"widgetType": "user|html|..."
 [
 ... 
 you always should get existing configuration,
 update the parts you need to update 
 and save the full content
 ]
}

HTML

{
    "type": "widget",
    "widgetType": "html",
    "uuid": "ca2bd99c-...",
    "properties": {
        "content":
            {
            "fr": "<p>Contenu html en français</p>",
            "en": "<p>Html text in english </p>" 
            },
       [...]
    }
    [...]
}

User

{
    "type": "widget",
    "widgetType": "user",
    "uuid": "ed1330ac-...",
    "properties": {
        "type": "pick",
        "usersIds": [  ## add the list of user ids
            "4546092634079232",
            "5506235727216640"
        ],
        [...]
    },
    [...]
}

Metadata selector

Set the list of metadata value id you want to display. The widget display them in the right selector. See metadata for how to retrieve metadata values

{
    "type": "widget",
    "widgetType": "metadata",
    "uuid": "ed1330ac-...",
    "properties": {
         "metadata": [
             "5831219767017472"
         ],
        [...]
    },
    [...]
}
Clone this wiki locally