Request: Nested or grouped repeatable content within slices

@Pau Is this feature in the roadmap of the new Page builder?

2 Likes

+1

I've built ~20 of websites in Prismic (and many more in rival CMS) over the last few years and this is the key feature that stands out to me when compared to other CMS that Prismic are so far behind the competition.

This has been a feature that's requested (like lots of others) over and over with absolutely no movement from the Prismic team, which is really disappoint and quite frankly pushes me to use similar competitors who offer this very basic feature.

It's quite fustrating also that the Prismic team constantly ask for use cases when all you have to do is look at alternative CMS to see this is a very basic feature offered in the majority of Prismic's competitors. The end users should not have to keep justifying features such as this, it feels very lazy and unhelpful.

The Prismic team need to provide clearer roadmaps for features as telling the community "this is not currently in development" and giving us "hacky" workaround is not what I'd expect from a small startup let alone a well established business in the industry.

2 Likes

Hi, I have a question about repeatable group of fields into repeatable zone in Slice.

I want to create Slider, where I have one main image (Room Image), and various number of nested images(Product Image).

For example:
Slide #1

  • Room Image
  • 1 Product Image
  • 2 Product Image
  • 3 Product Image
  • 4 Product Image
    Slide #2
  • Room Image
  • 1 Product Image
  • 2 Product Image
    etc.

Is there any option to do this? I was looking for examples of it and I couldn't find. :frowning:

1 Like

Hi @angelika.wronska ,

Welcome to the Prismic community, and thanks for this question :slight_smile:

There is no way to do nested groups in Prismic, though it is something that our product team discusses from time to time.

There are some workarounds that you could use to make this work. To me, the easiest would be to create a repeatable zone with two properties: the slide and the image. So, the model would look like this:

.
├── Non-repeatable Zone
│   └── Title
└── Repeatable zone
    ├── Slide Number
    ├── Parent/Child (Select)
    └── Image

Then, your content might look like this:

.
├── Non-repeatable Zone
│   └── Title: Interiors
└── Repeatable zone
    ├── Item
    │   ├── Slide Number: 1
    │   ├── Parent/Child: Parent
    │   └── Image: house-main.jpg
    ├── Item
    │   ├── Slide Number: 1
    │   ├── Parent/Child: Child
    │   └── Image: house-living-room.jpg
    ├── Item
    │   ├── Slide Number: 1
    │   ├── Parent/Child: Child
    │   └── Image: house-bedroom.jpg
    ├── Item
    │   ├── Slide Number: 2
    │   ├── Parent/Child: Parent
    │   └── Image: office-main.jpg
    └── Item
        ├── Slide Number: 2
        ├── Parent/Child: Child
        └── Image: office-kitch.jpg

In your project, you would parse the data and organize it into a nested hierarchy:

Slider
├── Slide 1
│   ├── Parent: house-living-room.jpg
│   └── Children
│       ├── Child: house-bedroom.jpg
│       └── Child: house-living-room.jpg
└── Slide 2
    ├── Parent: office-main.jpg
    └── Children
        └── Child: office-kitchen.jpg

Alternatively, some users choose to do this with Content Relationships. That way, you could define each slider as a document, and each slide as a slice, with a main image in the non-repeatable zone, and sub-images in the repeatable zone.

Let me know what you think!

Best,
Sam

1 Like

Thanks Sam for reply! This idea is a little bit messy for me and not comfortable. I will try with Content Relationships. Is there any guide for that Content Relationships?

Hey @angelika.wronska ,

We don't have a guide. But, it would look something like this:

Create a Custom Type called "Slider" with an Image field "Main image". Then, create a group field, and inside the group field add an Image field called "Product Image".

Then, you'll link to the Slider document from another Custom Type, which I'll call "Page". On the "Page" Custom Type, create a Content Relationship field called "Slider".

In your code, you can use fetchLinks when you query the Page Custom Type to fetch the Slider data along with the Page content data.

If you'd like a more detailed example, let me know what technology you're using, and I might be able to create an example of the query and templating.

Sam

Hi! :wave: I'm extremely new to Prismic and NextJS. In fact, I only decided to get into it after discovering Christian Laufenböck's beautiful work for Lot61 earlier this week.

So far, I'm really impressed with SliceMachine, but there's one thing I'm missing right out of the gate: the ability to repeat grouped fields. For instance, if I want to build a Statistics slice like this, and make it flexible so it can have anywhere between 2-4 statistics...


...I would ideally have a repeatable group of 2 Key Text fields (Value and Label) for each stat.

I see a similar question was also asked in 2021, so I'm actually surprised this option hasn't been requested more? :slight_smile:

Thanks!

1 Like

Hi @oscaralexander

Welcome to the Prismic community and that great feedback.

As mentioned in the linked threads, it is not possible to embed group fields inside another group field, but there are many alternatives to doing 2 levels deep structure using Slices + groups.

So for me, the easiest way to achieve what you want to that is to do is to:

  • create a custom type single or repeatable "slider"
  • inside this custom type, you can create a Slice field "slider item"
  • this slice has a group field that contains the sub items and an image field for the background.

And then, you can link to slider documents using the content relation field, where you can refer to from the pages where you want to display a slider on your website and fetch the data on your front using FetchLinks or GraphQuery.

Following this request..

I'm also looking for this feature again and again, but the content relationship/custom type route seems to be the only way. Unfortunately it is quite cumbersome for someone to manage as they would have to go out of the page editor and go to edit that custom type separately before heading back to the page before continuing editing. It would be amazing to be able to have nesting functionality. Would also be nice to know why these features are so complex to implement?

Thanks!

2 Likes

Just an update for everyone. Nested groups or Slices have been a long-requested feature and we understand the need for it from your use cases.

We are currently reshaping the experience for developers to build Pages Types and Navigation Types (Headers, Footers etc..) in Slice Machine, and this topic is part of the things that we want to improve, although we do not plan to include this until we come up with the first versions of Navigation Types in Slice Machine.

Once we release Navigation Types in Slice Machine we'll move on to the other use cases we'll keep you all updated here.

Thank you for your patience and passion about getting these features out.

3 Likes

Thank you for the update @Phil . I think your community of followers/fans really just want to feel heard and know that their requests aren't falling on deaf ears. I'm sure our request is not a "simple fix" by any stretch otherwise it would have been done a while ago. Updates like this help us to know we're not holding our breath for no reason.

1 Like

+1 on nested content/lists.

And thanks to the Prismic team for keeping us updated!

+1 for this feature.

I'm loving slicemaching, which obviously emphasis utilising slices. But not being able to have multiple repeatable zones/groups in a slice is a drawback. Thanks to the Prismic team for the great support however!

1 Like

+1 for this feature :eyes:

@Phil Hi! Is there any ETA of when this feature will came out, at least, on beta Page Builder? Thanks!

+1 for this, it's the missing feature that holds me back using prismic on very large websites.

+1 Please implement this!

+1 Please implement this!

A post was split to a new topic: Content Modelling Multiple Blocks