![]() ![]() Learn more about managing space roles and creating custom roles here. In the Draft section, hover on the Blog page version, click the more icon, and select Make default. Manually copying and pasting copy from your Google Doc into Contentfuls rich text. ![]() Copy the space Id and api key as shown in the screenshot. In the Component settings > Configuration section, select the frontastic/content data source filter. This guide will walk you through your first steps using Contentful within an Express Node js. Then, click Save.įrom the Components list, select the Contentful blog component and drag it into the layout element. From the Layout drop-down, select the desired layout. In the Page version name field, enter Blog. Then, click + New page version: the Create page version dialog opens. Select Default page in the Page rules section. Then, select the Contentful blog dynamic page. In the left-hand navigation, click Dynamic pages. This saves a network request, making the whole process faster. During server-side rendering, the dataSourcePayload is passed directly to the components that specify frontastic/content as the data source. In the example below, the dynamic-page-handler sends the dataSourcePayload for the frontastic/content data source. Providing dataSourceType in a dynamic page schema optimizes the fetching of the dataSourcePayload at the time of dynamic page resolution. Open the amerx file In the Code tab, click the access.ts file From the Contentful website, copy your spaces Space ID to the variable SPACEID. You do this by adding content types for each kind of content you wish to have in our space. Your space serves to keep all content related to your project represented by specific types of data, called content models. In the following sections, you can see how to dynamically render a blog based on the page request URL. In Contentful, you create workspaces or spaces for short. For this, you can use dynamic pages to dynamically render a page based on the requested URL. However, in a real-world scenario, configuring each page with a different blog "Entry ID" will get tedious and you'd want to render the blog content dynamically based on a URL path. You've successfully built a blog page using the data from Contentful. Open in your browser to see the page live. Hover on the First blog page version, click the more icon, and select Make default. Then, click Save and click the back arrow to go back to Site builder.įrom the page folders list, select the Contentful page folder. To see the preview of the page version, click Preview. In the Component settings > Configuration section, select the Single content data source filter. Then, click Save.Ĭlick + and add a layout element to a section of the page.įrom the Components list, select the commercetools UI content blog component and drag it into the layout element. In the Page version name field, enter First blog. Then, click New > Create page version: the Create page version dialog opens. From the page folders list, select the Contentful page folder. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |