My understanding is that the fields structure in routes data should be fairly flat, having just the fields and then a value beneath.
Example:
---
name: about
placeholders:
appname-main:
- componentName: Heading
fields:
titleField:
value: Page Title
imageField:
value:
src: "/assets/img/logo.png"
alt: Logo
I would like to instead provide a "deeper" set of data to a placeholder component. For example, I'd like to provide a image carousel component with an array of objects, each object containing image source, slide title, tags, etc.
Something like this:
---
name: about
placeholders:
appname-main:
- componentName: Carousel
fields:
data:
- title:
value: Image One
img:
value:
src: "/assets/img/img1.png"
alt: image one
tags:
value: tag1, tag2
- title:
value: Image Two
img:
value:
src: "/assets/img/img2.png"
alt: image two
tags:
value: tag2, tag3
Is this type of deeper data structure allowed? If so, how would the associated sitecore definitions file be structured?
Also, is this even a reasonable way to set things up? I am a front-end dev -- not a Sitecore dev -- so am unsure if this is how data would be setup within Sitecore.
Thanks in advance for your help.