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:
getContent
uses this CMS Delivery Contents Resource.
Parameter Name | Type | Description | Required? |
---|---|---|---|
channelOrSiteId | String | The ID for the enhanced LWR site on which you want to use CMS content. | |
contentKeys | String[] | The content keys for the CMS content that you want to use on your enhanced LWR site. | |
managedContentIds | String[] | The managed content IDs for the CMS content that you want to use on your enhanced LWR site. | |
contentTypeFQN | String | Fully qualified name of the managed content type. | |
referenceDepth | Integer | An integer 0–3 specifying the depth of references. | |
page | Integer | 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 | Integer | Specifies the number of items per page. Valid values are from 1 through 250. If unspecified, the default size is 25. | |
includeContentBody | Boolean | Specifies whether to return the content body (true ) or summaries of references (false ) in the response body. If unspecified, the default value is false . |