I am using a Custom Component for my footer and I am using list of lists for my url grouping,
Builder.registerComponent(Footer, {
name: ‘Footer’,
inputs: [
{
name: “logo”,
type: ‘file’
},
{
name: ‘footerlinks’,
type: ‘list’,
subFields: [
{
name: ‘linkText’,
type: ‘text’
},
{
name: ‘linkURL’,
type: ‘text’
}
]
},
]
}),
I want to know if there is any way in which I can create n-level heirarchy using my code, like I click add heirarchy and I am able to input next level element in cms?
Yes, you can create an n-level hierarchy using your code structure. To allow for dynamic nesting of elements in your custom component, you can utilize a recursive approach.
Here’s how you can modify your code to support nested levels: