Currently I'm working on a form component that will be used as a widget property in the Page Builder scenario. This form component needs to have information of the current page it's on. I assumed that the Dependency Injected IPageBuilderDataContextRetriever object would contain the Configuration of a page (pageBuilderDataContext.Retrieve().Configuration) but instead I'm getting the following error: Required property 'pageIdentifier' not found in JSON. Path '', line 1, position 1.
Required property 'pageIdentifier' not found in JSON. Path '', line 1, position 1.
So it appears that a form component is unable to know information of a page where it's being used on. Is there a way to retrieve this information? Or just find out the id of the page so I can retrieve it myself? In Portal Engine for example I was able to use macro's to pass data to a formField regarding the current page it's on.
Have you tried IPageDataContextRetriever.Retrieve<TreeNode>().Page() ?
IPageDataContextRetriever.Retrieve<TreeNode>().Page()
For example, when developing a widget displaying links to a set of pages, a property of the widget could use the page selector form component to enable editors to choose the pages.
Please, sign in to be able to submit a new answer.