Newer Version Available

This content describes an older version of this product. View Latest

Set Up a Connection for Your JSON CMS (Beta)

To set up a CMS connection to your JSON content, specify the server URL and paths to the content. The CMS connection is the secret sauce that lets your community page locate and retrieve CMS content.
  1. In Setup, enter All Communities in the Quick Find box, then select All Communities.
  2. Under Workspaces, click CMS Connect.
  3. To create a new connection, click New, and enter the connection details.
    • Name—Enter a connection name, for example, Blogs.
    • Connection Type—Select Public.
    • CMS Source—Select your CMS source, for example, Wordpress.
    • Server URL—Enter the URL, for example, https://public-api.wordpress.com.

    enter the server URL

    You can also select an existing connection to edit and add JSON content.

  4. In the JSON section, click Add JSON.

    When defining a JSON connection, skip the Root Path, CSS, and Scripts sections. They’re needed only for HTML connections.

    Note

  5. Enter a content type name. It can be anything you want. For example, Home Improvement Blogs. The name provides an easy way to group related content.
  6. Select the type of content to add. Is it a single article or blog post, such as DIY Dryer Vent Cleaning? Then select Content Item. Or is it a grouping of items, such as DIY Featured Blogs, that has links to individual blog posts? Then select Content List.

    Let’s create a content list that pulls in some blog articles. When you configure a content list, you also set up a content item that points to each item in the list.

  7. Click Add a content list.
    1. Enter a name for the list, for example, Featured Blogs.
    2. Enter the relative path to the JSON content in your CMS, for example, rest/v1.1/sites/capricornblog.wordpress.com/posts.

      enter the JSON path

  8. Click Add a content item.

    To create a detail page and a Read More link for your list items, add a content item with your content list under the same content type name. When you publish your community changes, the link displays each list item in full. For example, clicking the link under an item in a blog series displays the full blog article, not just a summary.

    Note

    1. Enter a name for the content item, for example, Blog Item.
    2. Enter the relative path, for example, rest/v1.1/sites/capricornblog.wordpress.com/posts/{component}. The {component} variable indicates the path for an item ID, like $postId. It is appended dynamically at runtime based on the content item referenced. There are four variables you can use in a JSON path: {component}, {itemsPerPage}, {pageNumber}, and {offset}.
    3. Enter the ID and title for the content item. JSON expressions are expected in the ID and Title fields here, so you don’t enter them with an @.

      define a content list and a content item

  9. Want to add more JSON served content? Repeat the previous steps for each content item or content list to add. You can add up to five different JSON connections, each with up to one JSON content item and 10 JSON content lists. Save the connection when you’re finished.

The next step is to drag a JSON component to your page using the Community Builder. For instructions, see Add CMS Connect (JSON) Components to Your Community Pages (Beta).

This release contains a beta version of the JSON connector, which means it’s a high-quality feature with known limitations. The JSON connector isn’t generally available unless or until Salesforce announces its general availability in documentation or in press releases or public statements. We can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features. You can provide feedback and suggestions for CMS Connect in the Community Cloud group in the Trailblazer Community.

Note