Register Now: Use Visual Dev + AI to Ship 10x Faster on July 24

Announcing Visual Copilot - Figma to production in half the time

Builder.io logo
Contact Sales
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

‹ Back to blog

DATA MANAGEMENT

Using Contentstack data in Builder's Visual Editor

September 23, 2021

Written By Kapunahele Wong

When you have data that resides in Contentstack that you want to use in your Builder app, you can use Builder's data provider plugins to fetch and display it on your site.

Goals

This tutorial shows you how to use Builder's data provider plugins to get data from ContentStack into your Builder app through the following steps:

  • Enabling Contentstack
  • Authenticating to Contentstack
  • Using your data in your Builder app

In this example, we're using Contentstack with some placeholder data. Depending on your data, this part might be different for you.

In Contentstack, we have a stack with content types of ArticleCategory, Author, BlogPost, and Signature.

In Contentstack's Entries section, we have some sample data, which includes two blog posts that we'll use in our Builder app.

To enable a third-party data provider, you have to configure Builder to be able to see the provider.

Open a page in the Builder visual editor.

In the page, open the Data tab.

The Data tab displays the sources available. Builder as a data source works by default, but the other options need you to enable them. In this example, we’ll enable Contentstack, so click the icon for Contentstack.

In order for Builder and Contentstack–or other data provider–to communicate, you must authenticate from within Builder.

When you enable a data provider, Builder prompts you to configure your settings at the bottom of the screen.

Click Configure so you can authenticate.

👉Tip: If you miss this prompt, you can still continue setting up your data provider by going to Integrations and clicking on the Settings button for that data provider.

In the settings dialogue, enter your API key, Delivery token, and Environment name.

👉Tip: To find the Contentstack API key, Delivery Token, and Environment name, check the following places in Contentstack:

  • API key: Settings -> Stack
  • Delivery token: Settings -> Tokens -> select your token
  • Environment name: Settings -> Environments

Paste in the values you gathered from Contentstack and click the Connect button.

Now that you've authenticated, you can click on the Contentstack icon in the Data tab to see your resources.

Choose the blogpost resource.

Drag a Text block onto the +Add Block section.

On the Data tab, you should now see your Contentstack Blogpost featured at the top. Click Pick an Entry.

Select My first blog post.

On the Options tab, click on the four dots in the upper right corner.

Scroll down and select Blogpost - Entry - Title.

When you click away, you'll see that the blog post title now populates the text field and there's a note that the text field is bound to dynamic data.

👉Tip: If you need to change the data you're binding to, click the four dots to the right of the note in the Options tab.

Now you can continue to add more elements to your page to build the rest out, all connected to dynamic data managed in Contentstack!

This article walked you through pulling in a single piece of data from Contentstack. Data binding is a robust feature available throughout Builder, wherever you see the four dots. You can use data binding to get styles, list data, and you can even filter your results.

Share

Twitter
LinkedIn
Facebook
Hand written text that says "A drag and drop headless CMS?"

Introducing Visual Copilot:

A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot
Newsletter

Like our content?

Join Our Newsletter

Continue Reading
CMS10 MIN
Structured Data: What It Is and Why You Need It
WRITTEN BYLuke Stahl
July 15, 2024
CMS11 MIN
Why Headless CMSs Are A Huge Step Backwards For Content Management
WRITTEN BYSteve Sewell
July 12, 2024
AI20 MIN
Best AI Coding Tools for Developers in 2024
WRITTEN BYVishwas Gopinath
July 12, 2024