getContents
Retrieves a list of published content from an enhanced CMS workspace or non-enhanced CMS workspace for an enhanced LWR site in Experience Cloud. This wire adapter can also retrieve published content from a non-enhanced CMS workspace for a non-enhanced LWR site.
To get Salesforce CMS content from an enhanced or non-enhanced CMS workspace for an Aura site, use the lightning/cmsDeliveryApi
module’s listContent
wire adapter instead.
With channelId
parameter:
With siteId
parameter:
channelOrSiteId
—(Required) The ID for the enhanced LWR site on which you want to use CMS content.contentKeys
—The content keys for the CMS content that you want to use on your enhanced LWR site.managedContentIds
—The managed content IDs for the CMS content that you want to use on your enhanced LWR site.contentTypeFQN
—Fully qualified name of the managed content type.referenceDepth
—An integer 0–3 specifying the depth of references.page
—Number of the page you want returned. Starts at 0. If you don’t specify a value or if you specify 0, the first page is returned.pageSize
—Specifies the number of items per page. Valid values are from 1 through 250. If unspecified, the default size is 25.includeContentBody
—Specifies whether to return the content body (true
) or summaries of references (false
) in the response body. If unspecified, the default value isfalse
.