Learn why Gartner just named Builder a Cool Vendor

Announcing Visual Copilot - Figma to production in half the time

Builder.io logo
Contact Sales
Platform
Developers
Contact Sales

Blog

Home

Resources

Blog

Forum

Github

Login

Signup

×

Visual CMS

Drag-and-drop visual editor and headless CMS for any tech stack

Theme Studio for Shopify

Build and optimize your Shopify-hosted storefront, no coding required

Resources

Blog

Get StartedLogin

Data models are the paradigm, or pattern, that defines the shape of data. For example, an author data model might include the author's name, handle, and photo.

Image of nav links highlighted on a wireframe of a webpage and a note that says, "Integrate CMS data".

Integrate Builder Sections with your codebase

When you integrate your data with Builder, non-coding teammates can use that data wherever they need it—leaving developers free to focus on the code.

Integrate CMS Data

Data models are pure data, which means there is no drag-and-drop aspect to using Data models in the Builder Visual Editor. However, as with all Builder models, you can use targeting, scheduling, custom fields, queries, and custom roles.

Examples of use cases for Data models include:

The following image shows an example of data as a navigation link. There is no drag-and-drop feature associated with a Data model. Rather, you pull the data in and use it in your project and you control the rendering entirely.

To find and view your Data models, do the following:

  1. Go to the Models section of the Builder UI.
  2. Scroll to the CMS Data Models section.
  3. Select a Data model.

The following video demonstrates the above steps to locate and open a real, internal Builder URL Redirect Data model.

Tip: The only model that Builder has by default is the Page Model, so there are Data models in the CMS Data section only if your team has created them.

Use Data models are perfect for providing your teammates with raw data that they can use anywhere in the project.

To create and use a Data model, do the following:

  1. Go the Models section in Builder.
  2. Click the + Create Model button.
  3. Choose Data.
  4. Name the model in the Name field and fill out the Description field.
  5. Click Create.
  6. For Type, choose File.
  7. Click Create.
  8. Add any needed custom fields.
  9. Click Save.

To use the new Data model, integrate with your codebase and then your teammates can use the data in the Visual Editor.

The following video shows how to create an example Blog Author Data model then shows how to use the new model in a content entry:

To use a Data model, make sure you've already integrated CMS Data. The following video demonstrates using this same Blog Author Data Model from the previous section:

  1. In the Content section of Builder, click the + New button and choose the data model. Here, the example data model is Blog author.
  2. Fill out the fields you created in the previous section. Note that the required fields are red with an asterisk and note that indicates they are required.
  3. Name the Data Model entry. In this case, the name is the same as the author name.
  4. Click Publish.

Because this Data model is integrated with the codebase and associated with a real internal Builder Blog article section, the Options tab in the Visual Editor displays a place for users to choose the entry.

This example shows making a Data Entry for a blog author named Almosta Shakespeare and choosing Almosta as the author in a blog article.

To find the model name:

  1. Open the model in the Models section of Builder.
  2. Click the Show More button and copy the Unique identifier.

To find the name of a custom field, expand the custom field. Name is the first entry.

The following video shows finding the model name and a custom field name.

For more detail on query, refer to the query section of the Builder GitHub readme Interface: GetContentOptions and MongoDB's Query and Projection Operators.

To get more familiar with query parameters, refer to Builder Content API and the interactive Builder REST API Explorer.

Models are a foundational part of Builder that you can customize to countless use cases. For more information on what you can do with models, refer to the following documentation:

Was this article helpful?

Product

Visual CMS

Theme Studio for Shopify

Sign up

Login

Featured Integrations

React

Angular

Next.js

Gatsby

Get In Touch

Chat With Us

Twitter

Linkedin

Careers

© 2020 Builder.io, Inc.

Security

Privacy Policy

Terms of Service

Get the latest from Builder.io

By submitting, you agree to our Privacy Policy

Product

Platform Overview

Integrations

What's New

Open Source

Builder

Mitosis

AI Shell

Micro Agent

GPT Crawler

Qwik

Partytown

Popular Guides

From Design to Code Guide

Composable Commerce Guide

Headless CMS Guide

Headless Commerce Guide

Composable DXP Guide

Design to Code

Resources

Blog

Knowledge Base

Community Forum

Partners

Templates

Success Stories

Showcase

Resource Center

Frameworks

React

Next.js

Qwik

Gatsby

Angular

Vue

Svelte

Remix

Nuxt

Hydrogen

See All

© 2024 Builder.io, Inc.

Security

Privacy Policy

SaaS Terms

Security & Compliance

Cookie Preferences

Gartner Cool Vendor 2024