Adobe recommends using the SPA Editor for projects that require single page application framework-based client-side rendering (for example, React). Learn more.
Adobe Experience Manager (AEM) content can easily be rendered by way of Sling Default Servlets to render JSON and other formats.
Those out-of-the-box renders typically walk the repository and return content as is.
AEM, by way of Sling, also supports developing and deploying custom sling renderers to take full control of the rendered schema and content.
Content Services Default Renderers fill the gap between out-of-the-box Sling Defaults and Custom Development allowing customization and control of many aspects of the rendered content without development.
The following diagram shows the rendering of content services.
Use <RESOURCE.caas[.<EXPORT-CONFIG][.<DEPTH-INT>].json to request JSON.
RESOURCE | an entity resource under /content/entities or a content resource under /content |
EXPORT-CONFIG | OPTIONAL an export configuration found under /apps/mobileapps/caas/exportConfigs/EXPORT-CONFIG |
DEPTH-INT | OPTIONAL depth recursion for rendering of children as used in Sling rendering |
Export configs can be created to customize JSON rendering.
You can create a configuration node under /apps/mobileapps/caas/exportConfigs.
Node Name | Name of the configuration (for rendering selector) |
---|---|
jcr:primaryType | nt:unstructured |
The following table shows the properties of Export Configs:
Name | Type | Default (if, not set) | Value | Description |
includeComponents | String[] | include everything | sling:resourceType | exclude details for nodes with specified sling:resourceType from JSON export |
excludeComponents | String[] | exclude nothing | sling:resourceType | include details only for nodes with specified sling:resourceType from JSON export |
excludePropertyPrefixes | String[] | exclude nothing | Property prefixes | exclude properties that start with specified prefixes from JSON export |
excludeProperties | String[] | exclude nothing | Property names | exclude specified properties from JSON export |
includeProperties | String[] | include everything | Property names | if excludePropertyPrefixes set else (exclude properties ignored) only include these properties |
includeChildren | String[] | include everything | child names | exclude specified children from JSON export |
excludeChildren | String[] |
exclude nothing | child names | include only specified children from JSON export, exclude other |
renameProperties | String[] |
rename nothing | <actual_property_name>,<replacement_property_name> | rename properties using replacements |
Create a configuration node under /apps/mobileapps/caas/exportConfigs.
name | resourceTypeOverrides |
---|---|
jcr:primaryType | nt:unstructured |
The following table shows the properties:
Name | Type | Default (if, not set) | Value | Description |
<SELECTOR_TO_INC> | String[] | - | sling:resourceType | For the following sling resource types, don't return the default CaaS json export. Return a customer json export by rendering the resource as; <RESOURCE>.<SELECTOR_TO_INC>.json |
Content Services include two export configurations:
Content Services default export configuration is applied if a config is specified in the requested URI.
<RESOURCE>.caas[.<DEPTH-INT>].json
Name | Value |
excludeProperties | |
excludePropertyPrefixes | jcr:,sling:,cq:,oak:,pge- |
includeProperties | jcr:text,text jcr:title,title jcr:description,description jcr:lastModified,lastModified cq:tags,tags cq:lastModified,lastModified |
includeComponents | |
excludeComponents | |
includeChildren | |
excludeChildren | |
Sling JSON Overrides | foundation/components/image wcm/foundation/components/image mobileapps/caas/components/data/contentReference mobileapps/caas/components/data/assetlist |
This configuration extends the default to include grouping children under a child node.
<SITE_PAGE>.caas.page[.<DEPTH-INT>].json
See the resources below to learn about additional topics in Content Services: