Search element settings (Beta)
Search element settings (Beta)
element.searchSettings()
Retrieve the configurable settings for an element, such as alt text, image source, heading tag, link target, and Collection List settings.
For standard element settings, the response includes current values, binding information, resolved values, and display labels. Collection List settings include current values and display labels.
This method is available on all element types that have at least one setting. Results can be filtered by value type or by setting key.
Beta
These methods are in public beta and may change with future releases.
This method does not support component instances.
To retrieve the properties of a component instance, use element.searchProps().
Syntax
Related interfaces:
Parameters
options (optional)
An object with the following optional properties:
Both filters can be used together. When no options are provided, all settings for the element are returned.
Returns
Promise<Record<string, SearchSettingsResult>>
A Promise that resolves to an object mapping setting keys to setting result objects. Returns an empty object when the element has no settings or no settings match the filter criteria.
Standard ElementSetting objects have the following fields:
Collection List settings use a structured CollectionListElementSetting object:
For Collection List settings, the record uses the Collection List setting names as keys: source, queryMode, filters, filterMatch, sort, limit, offset, pagination, and curatedItemIds.
For example, results.source.value is the connected source, or null when the Collection List has no source.
For standard ElementSetting objects, the value field always uses a { sourceType, ... } shape.
The possible variants are:
Notes
textContent-type setting values are returned as{ innerText: string }objects rather than bare strings.- When a standard setting is bound to a CMS source,
resolvedValueisnull. This is a current limitation. - Both
FormandFormBlockelements return the same form settings (name,method,action,redirect,state). Selecting either element returns those settings for convenience. - Collection List settings use
valueType: "collectionListSetting". These entries don’t includeresolvedValue. See Collection List settings.
Example
Designer ability
Checks for authorization only