getWidgetData
Version:
|
Type |
Function |
|
Import path |
|
Retrieves data for one or more widgets.
Signature
Parameters
|
Name |
Type |
Description |
|---|---|---|
|
|
Required. Data about the widget or widgets to retrieve. | |
|
|
Optional. Details about the site visitor's search request, such as locale, location, device, and web browser information. Sitecore Search uses this data for personalizing search results. |
Return value
Returns a promise.
Examples
Example 74. Running the getWidgetData function
Next.js
Note
To run this function, you have to first initialize the Cloud SDK.
Here's an example of how to use the getWidgetData function to retrieve data for one widget:
Here's an example of how to use the getWidgetData function to retrieve data for multiple widgets: