Strapi collection -> use "?populate=deep"

Hi,
With Strapi, it’s possible to get some level of relationship populated using the “populate-deep” plugin.
I believe it’s not used for current DH’s strapi plugin. Can you add this ?
Probably need a new parameter in plugin’s configuration (use strapi populate deep plugin Yes/No)
Then collections will be able to use “xxxx?populate=deep”

@xmasrock

Let me know once you can make Strapi online so we can implement this logic and test it out together.

@dejan : Online now.
Collection to test “Produit”

@xmasrock

I’ve added as input for now.
image

My use case is that I’m configuring a ProductDetail page (where deep should be used) configured as below

@xmasrock

Hmm, that’s not possible to configure on single pages at the moment.
Maybe for single pages we can always automatically force deep populate?

yes, it make sense that you need detailed info there. The default deep limit of 5 is probably good for most use cases

@xmasrock

Can you test it if works?

Nope

@xmasrock

For single pages, you are accessing the > page > data variable? Is there everything you need?

yes first iterator is

@xmasrock

I had to unpin all pages in order to test this.
Seems like it’s working?

the “contenu” is string? So you can’t iterate that?

Does it needs to be something else?

@xmasrock

Should work now

I can see the “images” to define the iterable. But then, when trying to define the image URL, the iterable I see at the image level is not this one :
The iterable for images in each onglet

The iterable for the swiper image :

@xmasrock

When you use multiple nested iterable, you need to change the key

image

Change from --key iterable to let’s say --key image

So then you will see both iterable and image variables.

1 Like

Woohoooo !
Thanks @dejan : it works like a charm :smiley:

OK, I’m having a similar problem. But my strapi version doesn’t have a populate=deep option. This is what’s working in postman to get the data I need:

However, I can’t figure out what to put in Divhunt’s builder settings to get those nested attributes to show up.

I’m driving myself crazy. What am I missing?

@will_lutz

I’m not quite sure that I understand? You are getting the company data? So what’s the issue?