Add multiple repeatable zones in a slice

I have a project using next js with slice machine and I have a slice where I am trying to render a table. Ideally, I'd have the option to add multiple repeatable zones so the people who are actually gonna manage the cms (not coders) would have it easier to understand that in a section they have to add the column headers and in another one, the values of the rows. I know it's not possible, though I really encourage Prismic to add this in the future.

However, I'd like another option. I have tried to add the table as a custom type, query the new type in the page type to get the content, and then add the content to the slice from a content relationship field. However, I cannot see the data (see the image below)


I tried to add the content relationship field in the page directly but, first, I have no clue where to style it or render the component If I create one, and mostly, where in the page to add. I am very confused

Hello @marina

Welcome to the Prismic community and thanks for reaching out to us.

To answer the first part of your question, it's possible to create a table by using the repeatable zone of Slices. We have a nice article on the same, which shows multiple ways to create a table in Prismic.

To answer the second part of your question, to see the data of the linked content, you need to adjust your API query with the graphQuery option. Once you adjust the API query the linked content will appear in a "data" object nested in the Link or Content Relationship field.
Would you please follow this document for Template Links & Content Relationships with Next.js - Prismic?

I'd recommend you to go with my first solution to create a table in Prismic.

Let me know what do you think about it.