Since the custom sliders have large amounts of information and we cannot rearrange the configuration record, we have to manually rearrange the whole data to rearrange sliders on the website as required, but using this solution, we can add a number field, and from the number, we can rearrange sliders in ascending order to show on the website.
Configuration:
{
"type": "object",
"subtab": {
"id": "shopblvd",
"title": "Shop The Blvd Feed",
"description": "Shop The Blvd Feed section",
"group": "homepage"
},
"properties": {
"homepage.shopblvd.Links": {
"group": "homepage",
"subtab": "shopblvd",
"type": "array",
"title": "Shop The Blvd Feed",
"description": "Shop The Blvd Feed section",
"items": {
"type": "object",
"properties": {
"seqnumber": {
"type": "number",
"title": "Seq No",
"description": "Give sequence number as 1, 2, 3... for the sliders show in sequence as required."
},
"mainimage": {
"type": "string",
"title": "Main Image",
"description": ""
},
"popupimage": {
"type": "string",
"title": "Popup Image",
"description": ""
},
"itemimage": {
"type": "string",
"title": "Item Image",
"description": ""
},
"itemnames": {
"type": "string",
"title": "Item Name",
"description": ""
},
"buttontext": {
"type": "string",
"title": "Button Text",
"description": ""
},
"buybutton": {
"type": "string",
"title": "Buy Button Href",
"description": ""
}
}
}
},
"followus": {
"group": "homepage",
"subtab": "shopblvd",
"type": "string",
"title": "Follow Us",
"description": "Follow us section"
}
}
}
JavaScript:
var self = this;
self.blvdFeedSliders = [...Configuration.get("homepage.shopblvd.Links")].toSorted((a, b) => parseInt(a.seqnumber) - parseInt(b.seqnumber)) ?? [];
self.blvdFeedSlidersExtra = Configuration.get("homepage.shopblvd.Links") ? [...Configuration.get("homepage.shopblvd.Links")].toSorted((a, b) => parseInt(a.seqnumber) - parseInt(b.seqnumber)) : [];