Hello, in experience builder 1.14 i need a way to figure out the page of a given widget or a way to figure out what widgets are on page x and of course programmatically.
I tried this piece of code where i do the link between widgets and pages based on the layout property, can someone confirm this or give some advices ?
const widgetId = getWidgetId() //get the id of the given widgetconst appConfig = getAppStore().getState().appConfigconst widgets = appConfig.widgetsconst widgetLayoutId = widgets[widgetId].parent?.LARGE?.[0].layoutIdconst pages = appConfig.pagesconst pagesKeys = Object.keys(pages)let widgetPageId = ''pagesKeys.forEach(key => {if (pages[key].layout.LARGE === widgetLayoutId) {widgetPageId = key}})