Body configuration advanced description

The body corresponds to the sections displayed under the player and is configured in $dam.details.defaultCursorConfig.defaultAssetDetailMeta.body

 

Depending on the case, the configuration will be different :

  • Fulltext request

A fulltext request is made to retrieve related assets from the REST API call.

Config path

Default value

Description

Config path

Default value

Description

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].component

-

Must be “CwDamDetailRelatedContent”

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].showIfEmpty

false

Show or not the section if there is no content to display

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].i18n

-

i18n key of the section title

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].fulltextFields[]

-

An array of field names to use to find related content, and corresponding values (i.e keywords of the consulted asset) are used as the value of the fulltext parameter of the request.

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].cursor.max

6

Number of maximum related items to retrieve and display (max parameter of the request)

 

  • Request on one or more metadata of the consulted asset

To perform a search on particular metadata, you can use the component `CwDamDetailRelatedContent` in combination with a constraintsDescription object :

Config path

Default value

Description

Config path

Default value

Description

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].component

-

Must be “CwDamDetailRelatedContent”

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].showIfEmpty

false

Show or not the section if there is no content to display

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].i18n

-

i18n key of the section title

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].constraintsDescription

-

Object to construct the query i.e :

"constraintsDescription": { "coverage": { "coverage": "in" } }

 

 

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].cursor.max

6

Number of maximum related items to retrieve and display (max parameter of the request)

Example :

{ "component": "CwDamDetailRelatedContent", "showIfEmpty": true, "withoutLabel": false, "i18n": "CwDamDetailRelatedContent", "emptyMessageI18n": "detail.section.not_in_album", "delayLoadingMs": 500, "subtitle": { "i18n": "dam.details.defaultSubtitle", "linkI18n": "dam.details.defaultLink" }, "constraintsDescription": { "relatedassets_in ": { "relatedassets": "in" } }, "cursor": { "max": 24 } }

With this configuration, the assets to be queried are those that have one of the values set in the field relatedassets of the current asset.

Query :

activated = true AND relatedassets in [$currentAsset.relatedassets] AND id != $currentAsset.id
  • Request on links between assets:

Retrieve all objects that have the consulted object's ID present in the field defined by constraintDescription.

You can set up a metadata (list), named for example “related” to keep track of related objects. This metadata will handle object IDs, representing so-called linked assets.

You can display those related assets by using this configuration :

Config path

Default value

Description

Config path

Default value

Description

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].component

-

Must be CwDamDetailAssociatedContent

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].showIfEmpty

false

Show or not the section if there is no content to display

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].i18n

-

i18n key of the section title

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].constraintsDescription

-

Name of the field to use to retrieve related assets.

$dam.details.defaultCursorConfig.defaultAssetDetailMeta.body[0].cursor.max

6

Number of maximum related items to retrieve and display (max parameter of the request)

Example :

With this configuration, assets that will be retrieved inside the body content have the ID of the current asset inside the field relatedassets.

Query :