New in 1.33.0 (BETA)

useDataLocator(dataLocator)

Evaluates a given DataLocator and returns a DataScope instance.

This function returns a DataScope, based on the choices the editor made. If the argument is null, undefined, or an empty datalocator attribute value (i.e. the editor has not filled it out yet), an empty DataScope is returned.

Params

dataLocator (DataLocator) – the value of a datalocator attribute of a CMS object.

Returns

A DataScope that enables application developers to interact with data referenced by the DataLocator.

Example

A widget that lists data: