Request: Nested or grouped repeatable content within slices

Feature Idea (one per thread):

The ability to have groups with repeatable content inside of the repeatable area of a slice.

For example, I would like to create a "link list" slice. I can create this slice with a "title" key text in the non-repeatable area and then links in the repeatable area so an author would be able to create a column with a variable number of links with a title at the top. However, what I want is a group of link lists. If an author creates 1 link list I would want it to be a single column, if an author creates 2 or more link lists I would want them to display in a grid. But each link list needs to be grouped with the others.

Another example would be cards. If I wanted an author to be able to add a "cards" slice to the page and then within that slice be able to add a variable number of "cards", which might be a grouping of name, picture and occupation field for each card.

Issue that is solves:

When an author wants to create sections of repeatable groups.

24 Likes

Hi Matt,

Thanks for the feedback and the detailed use case. I’ve added your information to our feature request tracker for the product team to consider, but I know that this isn’t part of our roadmap for the foreseeable future.

There are some solutions for your use cases though.

For your first use case of a link lists grid:

  1. You could create multiple slices with each list in you document and configure your front-end application with a component which creates your grid using the list slices.

  2. Or you can create this structure with a document for creating your lists as described in the following document. Then either query this document directly or using a content relationship in the document that you want to use it in and use GraphQuery to get the data:
    https://user-guides.prismic.io/en/articles/2888625-creating-a-3-level-navigation-menu

For your second use case of creating cards: This is possible using slices, we did so in our slice machine project, you simply add the fields you need for your card in the repeatable zone of the slice like so:

Let me know if you have any questions.

Thanks.

3 Likes

This is being tracked as an open feature request.

If you have another use-case for this feature, you can 'Flag' this topic to reopen. Please use the :heart: button to show your support for the feature and check out our Feature Request Guidelines.

Hello everyone :wave:

I'd like to shed some light on this feature request as I'm deeply needed for some nested repetition.

For context, we are rebuilding our blog at getcircuit.com with SliceMachine. I'm modeling a slice that will show a selection of documents with this UI:

I intend to accomplish that by leveraging the Content Relationship field. However, Repeatable zone doesn't allow nested repetitions, which makes things harder than they needed to be.

Here's how I would model this slice with nested groups:

Repeatable zone

-- ContentCards Group (repeatable)
---- Content Relationship Field

-- Side content group 
---- Content block group (repeatable)
------ Title field
------ Content Item group (repeatable)  
-------- Content Relationship Field

However, as this kind of flexibility is not possible I'd have to use the repeatable zone for the first 4 cards and hack a static solution for the other two sections of three items. Which is far from optimal.

I've done similar interfaces in the past using the Repeater Field on WordPress' ACF and not being able to do the same on Prismic is quite frustrating tbh.

Is there an ongoing discussion about this feature where my team and I could join and participate? We love Prismic but this has been a point that came around a few times :slightly_smiling_face:

8 Likes

Hi Vitor,

This is a good use-case for multiple repeatable zones in a slice. The best workaround I can think of (and I know it’s not great) is to create a custom type for the side content, then use a Content Relationship field in the non-repeatable zone of the slice to select the side content for that slice.

The team are aware of this feature request and hopefully, it's something they can consider in future changes. It's not being worked on right now, if/when this changes the team will update everyone here.

Thanks.

Hey Phil,

Yeah, I thought of doing something like that but I think that kind of defeats the self-contained nature of a Slice. I'll try to work this out on the UX side and discuss with the team if the side-content can be something like a "latest posts" kind of thing instead of multiple relationships.

if/when this changes the team will update everyone here

I'm sure that it isn't something trivial to ship so the expectations are aligned, but I'll will be a very happy person if/when that day comes :stuck_out_tongue_winking_eye:

3 Likes

It's been 2 years since this thread has been opened regarding this lack of a very fundamental feature, is there any update on this or are we going to keep being forced to use messy workarounds?

2 Likes

Just wanted to flag another example - see attached a screenshot of a recent design I created which is hard to implement without using a separate Custom Type (which would be an overkill since I'm not using the info anywhere besides this page). Just to make it clear, the social media icons can be dynamic

1 Like

Hello @joshwcorbett

Unfortunately, the feature has not been implemented yet. If/when there is any change, we will update you here.

@kris Thanks for your feedback, and flag an example.

Priyanka

We would kindly like to request this feature as well.

The workaround is not great for our project.

Repeatable content within slices would solve this problem.

7 Likes

Thanks for showing your support for the feature @pop.

1 Like

How is this still not a thing ? For me it's a must have, you cannot conceive proper website without nested and repeatable groups inside a slice. Do you have anything new on this ?

7 Likes

hi All. Any update on this?

1 Like

Hi @alexandreguedj & @jev1,

Groups within Slices are not currently possible, the team are exploring this feature at the moment though. There's no ETA on when this will be released though.

Can you tell me more about your use cases? It will help us with the feature a lot and hopefully, I can offer you some content modelling advice on achieving this.

Thanks.

1 Like

I'm transitioning from a frontmatter, git-based content model to one of the big headless CMS. I found prismic the easiest to implement and priced reasonably so my pitch of JAMstack >>>>> wordpress can succeed, but alas I hit a wall on nested arrays. Here's how I use them in my project:


As you can see from the image I need an initial array for all of the resource categories, then an array for each section of those categories, and finally another array for the resources within the section. Here's what the front matter looks like:

resources: 
  title: "Resources"
  list: 
  - title: "User Manuals and Diagrams"
      type: "links"
      sections:
      - title: "2023" 
        link: ""
        list: 
        - title: "2023 User Manual" 
          link: "https://www.dropbox.com/sh/scqv8ktpexgmrh9/AABdjWd4YFx22nCL51JBHpeBa/2023/2023_User_Manual_-_06.27.22_Rev.1.pdf?dl=0"
        - title: "2023 Quick Start Guide"
          link: "https://www.dropbox.com/sh/scqv8ktpexgmrh9/AADWnEEDYgxNSyIOuXpaWGEWa/2023/2023_Quick_Start_Guide_06.27.22_Rev._1.pdf?dl=0"
      - title: "2022"
        link: ""
        list:
        - title: "2022 User Manual"
          link: "https://www.dropbox.com/sh/scqv8ktpexgmrh9/AAD75-h9qQ0383Z5Ch59Vh3Na/2022/2022-User-Manual.pdf?dl=0"
        - title: "2022 Quick Start Guide"
          link: "https://www.dropbox.com/sh/scqv8ktpexgmrh9/AADLcuA9xns9bEHv39DnT4s9a/2022/2022-Quick-Start-Guide.pdf?dl=0"
        - title: "2022 2D Plumbing Diagram"
          link: "https://www.dropbox.com/sh/scqv8ktpexgmrh9/AABZ3QLA0eLeDTXLnpWn7uCja/2022/2D-Plumbing-Diagram_Basic_2022-MODE_01.3.22_Rev.3.pdf?dl=0"
        - title: "2022 Electrical Diagram"
          link: "https://www.dropbox.com/sh/scqv8ktpexgmrh9/AAAj-WIFm83CeNItOn4-3Jhya/2022/Electrical_Diagram.pdf?dl=0"  
        - title: "Roof Rack Measurements"
          link: "https://www.dropbox.com/sh/scqv8ktpexgmrh9/AAATmqHXsRaE1QD6DrQ7jCJ9a/2022/Roof-Rack-measurements.jpeg?dl=0"
      - title: "2019 - 2020"
        link: ""
        list: 
        - title: "2019 - 2020 User Guide"
          link: "https://www.dropbox.com/sh/scqv8ktpexgmrh9/AAA44lqywEgPrhMMVMucS2mAa/2019-2020/2019-2020-User-Guide.pdf?dl=0"
        - title: "M-Power Energy Storage System Management"
          link: "https://www.dropbox.com/sh/scqv8ktpexgmrh9/AABrL44sfhPHZeTaEEv00zdka/2019-2020/Cold-Weather-Management.pdf?dl=0"

I could create custom types for each category and section, then use the relational fields to link them all together, but the UX for that will be a nightmare for non-technical users, who should always be the target audience of CMS.

2 Likes

Hi Ed,

What you could do here for the moment is use one Rich text field to add the text and links, then if you're using react target the headings to have that style:

I'm not sure, but maybe you couldn't recreate the 2-column layout as seen in the 2022 example, by maybe targeting the p tags could help achieve some CSS solutions.

Let me know if this helps.

Thanks.

This is a pretty critical feature for our designs. Groups need to be available in slices.

4 Likes

Hi Ian,

Can you tell me about your designer's use case?

Thanks.

+1 on this feature, more or less the only thing stopping me using Prismic more. Such a simple request available in most CMS's for years now.

3 Likes