Integrating structured data (in a non-custom component)

Note: Im using NextJs (Pages router)

On the Integrating structured data page, there’s an example of how to get the data for the component in the code.
In the example, a custom component of a navbar use the values from the cms-data by calling builder.getAll.

With builder.io’s native components such as Image, i don’t have access to the component code so i can’t use builder.getAll to get the values i need from the cms-data.

What i do today is a fetch call on my page to get all my cms-data and then i filter the data and pass it to the page’s BuilderComponent data prop.
This way i have access to this data anywhere on my page by referencing the state.

Is there a way to use my cms-data values in the editor without doing this fetch call and passing the data down to the page?
It feels like im defining the data in builder.io, fetching the data, and passing it back down to the editor. Is this roundtrip necessary? or is there a way to use/reference my cms-data directly in the editor?

Hello Neri,

Thanks for the question!
Is there a use case you can share with me? I may be able to better provide guidance if I understand the situation.

If you are rendering images that are associated with data from another source, you can utilize Data Models w/ Webhooks to expose that data.
The documentation, below, also outlines how to integrate that Data Model into your application.
I’ve also shared our Content API documentation which can be used to retrieve data from Builder Data Models.

If you have any specific questions, please feel free to contact support@builder.io.