# Connect Data Model as Data source in pages

**URL:** <https://forum.builder.io/t/connect-data-model-as-data-source-in-pages/1395>\
**Category:** Technical Questions\
**Tags:** feature\
**Created:** [November 30, 2021, 8:26pm UTC](https://forum.builder.io/t/connect-data-model-as-data-source-in-pages/1395 "2021-11-30T20:26:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paul](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/paul/32/831_2.png) [@Paul](https://forum.builder.io/u/Paul)\
**Post date:** [November 30, 2021, 8:26pm UTC](https://forum.builder.io/t/connect-data-model-as-data-source-in-pages/1395/1 "2021-11-30T20:26:42Z")

</div>

Hi!

**What are you trying to accomplish**  
I want for each of my data model to have the same page structure, but I don’t want to build the page each time.

In our use case, we have content writers that will be creating content in BuilderIO, using Data models. This is nice because it looks like a form, so the content writer can just fill the fields with the constraints we want.

So I have this page, listing all the “Item” data models:  
[https://mysite.com/items](https://mysite.com/items)

I want to build this page for each model:  
[https://mysite.com/items/{slug}](https://mysite.com/items/%7Bslug%7D)  
Where the “slug” is declared on the “Item” data model.

I don’t want to create N pages `items/X`, `items/Y`, I’d like to have one page model `Item` that will display the item I want based on the URL slug.

Here I can almost do it with a connector:  
 ![Screen Shot 2021-11-30 at 12.52.57 PM](https://us1.discourse-cdn.com/flex020/uploads/builder/original/1X/e21a1722d62579302f0bebc9580ccc976ecd8775.png)

**Code stack you are integrating Builder with**  
We are using NextJS

Thanks!

---

<div class="post-metadata">

**Author:** ![TimG](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/timg/32/714_2.png) [@TimG](https://forum.builder.io/u/TimG)\
**Post date:** [November 30, 2021, 10:41pm UTC](https://forum.builder.io/t/connect-data-model-as-data-source-in-pages/1395/2 "2021-11-30T22:41:05Z")

</div>

@Paul yes of course, this is definitely possible within Builder.

I would recommend you check out this guide on creating a Blog: [Creating a blog in Builder - Builder.io](https://www.builder.io/c/docs/creating-a-blog)

Which essentially goes through the same process, but instead uses a blog page as opposed to an item. Each time a new model is authored, it should automatically show on both the /items page and have its own /items/{slug} page. Hopefully that answers your question, try it out and let me know if you encounter any issues, or have any further questions!

---

<div class="post-metadata">

**Author:** ![Paul](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/paul/32/831_2.png) [@Paul](https://forum.builder.io/u/Paul)\
**Post date:** [November 30, 2021, 11:16pm UTC](https://forum.builder.io/t/connect-data-model-as-data-source-in-pages/1395/3 "2021-11-30T23:16:46Z")

</div>

@TimG Hey, thank you for the response, this is great but we would to minimize the code in the front-end of our app and handle all the writing of the pages in BuilderIO essentially. Basically having only one `[page].tsx` to handle all the pages of the app. Do you think this is possible?

---

<div class="post-metadata">

**Author:** ![TimG](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.builder.io/timg/32/714_2.png) [@TimG](https://forum.builder.io/u/TimG)\
**Post date:** [December 1, 2021, 6:48pm UTC](https://forum.builder.io/t/connect-data-model-as-data-source-in-pages/1395/4 "2021-12-01T18:48:10Z")

</div>

@Paul yes definitely. Going back to the blog example I linked above: [Creating a blog in Builder - Builder.io](https://www.builder.io/c/docs/creating-a-blog)

You really could omit the first List articles page mentioned, and only do the [page].tsx as you mentioned. Then within builder you can create a page at [https://mysite.com/items](https://mysite.com/items), connect the items data you have created, and then loop over that data to show all the items. Each would then link to the item pages using the logic outlined in the Add a Preview section of the linked page

You can find more on connecting data and looping over items on the pages below:

> **[Connecting your API data to builder - Builder.io](https://www.builder.io/c/docs/guides/connecting-api-data)**
>
> Build and optimize digital experiences for any tech stack, visually.

> **[Connecting dynamic data in Builder's Visual Editor](https://www.builder.io/blog/builder-data)**

---

<div class="post-metadata">

**Author:** ![brdev](https://avatars.discourse-cdn.com/v4/letter/b/e274bd/32.png) [@brdev](https://forum.builder.io/u/brdev)\
**Post date:** [November 14, 2024, 10:36pm UTC](https://forum.builder.io/t/connect-data-model-as-data-source-in-pages/1395/5 "2024-11-14T22:36:22Z")

</div>

I’m trying to understand how to do the same thing here: [Match slug in Connected Data query editor](https://forum.builder.io/t/match-slug-in-connected-data-query-editor/6774)

I want to pass in a dynamic value into the query editor.

---

<div class="post-metadata">

**Author:** ![builder\_akash](https://avatars.discourse-cdn.com/v4/letter/b/7bcc69/32.png) [@builder\_akash](https://forum.builder.io/u/builder_akash)\
**Post date:** [November 20, 2024, 5:30am UTC](https://forum.builder.io/t/connect-data-model-as-data-source-in-pages/1395/6 "2024-11-20T05:30:06Z")

</div>

Hello @brdev

Yes you can pass dynamic value to the query editor.  
Feel free to check out the documentation provided below:  
[https://www.builder.io/c/docs/data-binding](https://www.builder.io/c/docs/data-binding)
