Datasource location strategies for the JSS import process

Version: 22.x

When creating datasource items for renderings, the import process utilizes the datasourceStrategy value in the app configuration to look up an implementation of IDatasourceStrategy configured in the app configuration section /javaScriptServices/datasourceStrategies .

The import process uses an implementation of IDatasourceStrategy to determine the allowed datasource locations for any created renderings, and the parent folder for any created datasource items.

You can use one of the following values to set the datasourceStrategy configuration option:

Strategy

Description

appLevel

Datasource location and parent is a folder named for the datasource template, created at the path specified in appDatasourcesPath.

routeLevel

Datasource location and parent is a single folder under each route item whose name is indicated in routeDatasourcesPath.

preferRouteLevel (Default)

Configures both appLevel and routeLevel options as datasource locations, but utilizes routeLevel when importing items.

preferAppLevel

Configures both appLevel and routeLevel options as datasource locations, but utilizes appLevel when importing items.

Do you have some feedback for us?

If you have suggestions for improving this article,