#Define
"new-slice" : {
"type" : "Slice",
//No repeatable zone
"non-repeat" : {
"titre" : {
"type" : "StructuredText"
}
},
//Repeatable zone
"repeat" : {
"toto" : {
"type" : "StructuredText"
},
"icon" : {
"type" : "Image"
}
}
}
#INTEGRATE
for slice in pageContent.getSliceZone('page.slice').slices
//- Render the right markup for a given slice type.
case slice.sliceType
when 'new-slice'
!= slice.nonRepeat.titre.asHtml()
// the repeat part of the slices is treated as Group - see the docs https://prismic.io/docs/fields/group#integrate?lang=javascript
each item in slice.repeat.toArray()
!= item.getStructuredText('toto').asHtml()
the repeat part of the slices is treated as Group - see the docs https://prismic.io/docs/fields/group#integrate?lang=javascript