Access CMS Content with an LWC Wire Adapter (Beta)

Use the Lightning Web Components Wire Service to access Salesforce CMS content data. The lightning/cmsDeliveryApi module listContent wire adapter retrieves published CMS content versions for an Experience Builder site.
Where: This change applies to Lightning Experience in Enterprise, Performance, Unlimited, and Developer editions.
Note

Note

This feature is a Beta Service. Customer may opt to try such Beta Service in its sole discretion. Any use of the Beta Service is subject to the applicable Beta Services Terms provided at Agreements and Terms.

Who: To create and edit content, you must have a content admin or content manager role in that CMS workspace or be a Salesforce admin.

How: Use the lightning/cmsDeliveryApi module listContent wire adapter to get the published CMS content versions for an Experience Builder site.
import { LightningElement, wire } from "lwc";
import Id from '@salesforce/community/Id';
import { listContent } from 'lightning/cmsDeliveryApi';

export default class ListContentDemo extends LightningElement {

  @wire(listContent, {communityId: '$Id'})
  cmsRecords;
}