While creating a custom type using the Slice Machine, if you add slices into the Slice Zone across multiple taps, the data within the slice zone needs to be referenced as slice, then slice1, then slice2, etc.
You can see this demonstrated in the custom type here:
{
"id": "navigation",
"label": "Navigation",
"repeatable": true,
"status": true,
"json": {
"Navigation": {
"slices": {
"type": "Slices",
"fieldset": "Slice Zone",
"config": {
"choices": {
"menu": {
"type": "SharedSlice"
},
"link": {
"type": "SharedSlice"
}
}
}
}
},
"Buttons": {
"slices1": {
"type": "Slices",
"fieldset": "Slice Zone",
"config": {
"choices": {
"button": {
"type": "SharedSlice"
}
}
}
}
}
}
}
From a development perspective, slices and slices1 is not very descriptive. Is okay to change this value?
An example would be:
{
"id": "navigation",
"label": "Navigation",
"repeatable": true,
"status": true,
"json": {
"Navigation": {
"navigation": {
"type": "Slices",
"fieldset": "Slice Zone",
"config": {
"choices": {
"menu": {
"type": "SharedSlice"
},
"link": {
"type": "SharedSlice"
}
}
}
}
},
"Buttons": {
"buttons": {
"type": "Slices",
"fieldset": "Slice Zone",
"config": {
"choices": {
"button": {
"type": "SharedSlice"
}
}
}
}
}
}
}
I did give it a shot but only so far as changing the names in the custom type JSON and refreshing Slice Machine - everything seemed to work. I didn't push these changes to Prismic or anything for fear of breaking something.
Would it be safe to do? Will everything continue to work as normal?
cheers,
Scott.