Passing and fetching parameters

how do i pass a parameter in builder to a modal or another page(via url slug) and how to use it on that destination ?

e.g. if i am passing productid to url like mysite.com/productdetails/id=“productid” then how to use that parameter in API calls where Builder allows CORS enabled JSON endpoints. To get something like, api.mydatabase.com/tableproducts/{“productid”} and to get this parameter “productid” from the url slug, how to do this with 1. passing to another page and fetching it there 2. passing it to a modal and fetching it there.

@manish-sharma can you help here ?

Hello @nimkuski,

You may find help at our forum post

Let us know how that works for you. Thank you!

That refers to the content api i think. I am not referring to that, i am using data from my own database with cors enbaled api endpoint

Hello @nimkuski,

Can you tell us about your tech stack?

If you are using react-based integration then you can pass data and functions down to the Builder component to use in the UIs (e.g. bind data values to UIs e.g. for text values or iterating over lists, and actions to trigger for instance on click of a button)

All data passed down is available in Builder actions and bindings as state.*, for instance in the below example state.products, etc will be available

<BuilderComponent
  model="page"
  data={{
    products: productsList,
    foo: 'bar',
  }}
  content={builderJson}
/>

product listing grid and the modal with product details are all with builder’s own visual editor’s components.

Hi @nimkuski,

We would greatly appreciate your assistance in providing either the Builder content link or the public API key, if possible. Thank you in advance!