How to use a slice in repeatable zone?

So far my experience developing a client's website with Prismic has mostly been pain-free, but I've found one area which appears to be lacking documentation, and confusing because there was previously a different way of doing this (using 'group' fields). I would really appreciate clarity on this as there is no clear answer.

I created a Carousel component which has an image and a subtitle field both in the repeatable zone, so I could add as many images / subtitles as I wanted.

Now I want to create a more complex component that has 3 tabs and depending on the tab which is selected it will load a different carousel containing different images / subtitles.

It appears the old way to do this was to add a group field (which contains image / subtitle fields in itself), but since then Prismic has changed their API and it's unclear how to achieve this.

Please enlighten me. Thanks.

The repeatable zone inside a slice works similarly to a group field. The primary distinction is that you can incorporate a group field at the top level of your documents. These are two distinct content modeling concepts. However, it's essential to understand that you cannot nest slices within a group field.

To establish connections between content documents, you can use content relationship fields. This allows you to associate specific pieces of content with each other.

1 Like