Hi, i’m trying to populated a nested component and I’m struggling to get it to work.
I have a dynamic blocks component in one of my collections. The blocks has a type “shared.media”.
The shared.media component has a property file. I’m trying to populate the media data using a query. I cannot seem to get it.
If i do http://localhost:1337/api/articles/3?populate[blocks][populate]=true it will populate all of the blocks with the exception of this shared.media one.
I tried this http://localhost:1337/api/articles/3?populate[blocks][shared.media][file][populate]=true but also no luck. There is probably a simple answer to this, but can someone help?
{
"data": {
"id": 3,
"attributes": {
"title": "A bug is becoming a meme on the internet",
"description": "How a bug on MySQL is becoming a meme on the internet",
"slug": "a-bug-is-becoming-a-meme-on-the-internet",
"createdAt": "2024-04-14T19:01:12.929Z",
"updatedAt": "2024-05-02T01:56:35.673Z",
"publishedAt": "2024-04-14T19:01:12.924Z",
"careerPage": "overview",
"blocks": [
{
"id": 3,
"__component": "shared.quote",
"title": "Thelonius Monk",
"author": null,
"source": null,
"quote": null
},
{
"id": 3,
"__component": "shared.media",
"altText": null
},
{
"id": 3,
"__component": "shared.slider"
},
{
"id": 1,
"__component": "shared.section",
"title": "Hello world",
"body": "SDf adsfasdfasdf\nadsfSDf\n\n\nDSFDS"
},
}
},
"meta": {}
}
This topic has been created from a Discord post (1235758484209930302) to give it more visibility.
It will be on Read-Only mode here.
Join the conversation on Discord