Disclaimer: This website requires Please enable JavaScript in your browser settings for the best experience.

HomeDev GuideRecipesAPI Reference
Dev GuideAPI ReferenceUser GuideGitHubNuGetDev CommunityOptimizely AcademySubmit a ticketLog In
Dev Guide

Create content

Create and publish content in Optimizely CMS (SaaS), then configure it as the starting point for your application so it can be fetched using the JavaScript SDK.

Create content in Optimizely CMS (SaaS) and prepare it for retrieval using the JavaScript SDK. Complete these steps before fetching content in your application.

Prerequisites

  • You have access to an Optimizely CMS (SaaS) instance.
  • You have already defined and synced the Article content type.
  • You have sufficient permissions to create content and applications.

Create a home content item

Create a content item that acts as the entry point for your application.

  1. Go to CMS and click Create content.

  2. Add the following in the Create content window:

    1. Enter Home as the name.

    2. Select Article as the content type.

  3. Add sample content to the fields.

  4. Click Publish, then select Publish content.

You can now access the Home content item in CMS (SaaS).

Create an application

Create an application to define the start page for your site or experience.

  1. Go to Settings > Applications.

  2. Click Create application.

  3. Enter an Application name (for example, my-app). The system automatically generates the API ID.

  4. Select From existing, then select Home under Choose Start page.

  5. Click Create application.

You have now associated the application with the Home content item.

Update the Home URL

Remove the URL segment from the Home content item so it resolves as the root path.

  1. Go to Content > Home.
  2. Scroll to Name in URL and select Change.
  3. Clear the field so it is empty.
  4. Click Publish, then select Publish content.

The Home content item now resolves to the root URL of the application.

Next steps

You can now Fetch content from the CMS using the JavaScript SDK. Continue to the next guide to retrieve and render content in your application.