Hello guys !
i hope you are doing well.
I have a scenario where :
i have a model Events ( data model ) with fields ( title… )
another section model (Use cases) with fields ( title , Event reference )
so one event will have many use-cases… as every-use cases have their own detail page which will be implemented by handle. Now i have events page where i want all events with their use-cases. i made a custom grid component events grid where i tried following things to bind use-cases data with their events.
bind use-cases dynamic data to grid. and its not giving me the option of locale. as it gives with data model. so how would i get sections data with localization. im using nextjs App router.
2)added Input field with list of useCases but when i add data to the list it doesnt provide the reference data of Event. just ( id , modelname ). as its giving me the whole section model of usecase.
@manish-sharma can you please see the video how im trying to do… its the same scnario like products/categegories…
should i move my use-cases as data model too ???
loom video:
To implement this we recommend checking out our forum post on Dynamic Blog Article using Next.JS. It contains valuable insights that can help you with your project.
@manish-sharma i already have explored this example. this example have index page where all blogs are being fetched by api request on server and then hardcoded all the stuff so there is no builder.io interactivity… what i want is drag and drop other components like header and footer and some others. then a section which show grid with all events and their use-cases … thats why i created a custom component and trying to attach data to it…
if i use async await in the custom component i loose interactivity on page as no javascript work on client side like i cant open my dropdowns/no animation …
so i though i would attach my data somehow to the custom component and still use drag&drop functionality…
When dealing with data in Builder.io, you have a couple of options. You can either pass the data via a <BuilderComponent> or create a data model and bind it directly to the component.