Hi @sofiyans8042875
You can create a block (Buttons) and blockItem (Button)
{
"definitions": [
{
"title": "Buttons",
"id": "buttons",
"plugins": {
"xwalk": {
"page": {
"resourceType": "core/franklin/components/block/v1/block",
"template": {
"name": "Buttons",
"filter": "buttons"
}
}
}
}
},
{
"title": "Button",
"id": "button",
"plugins": {
"xwalk": {
"page": {
"resourceType": "core/franklin/components/block/v1/block/item",
"template": {
"name": "Button",
"model": "button"
}
}
}
}
}
],
"models": [
{
"id": "button",
"fields": [
{
"component": "richtext",
"name": "text",
"value": "",
"label": "Text",
"valueType": "string"
}
]
}
],
"filters": [
{
"id": "buttons",
"components": [
"button"
]
}
]
}
Then post this you can write the logic in your class i.e. buttons.js to fetch all the child elements of the blockItem i.e. button and render it as per the desired HTML.
Hope this helps!
Thanks