When i add a component to the page and do associate content to the rendering, along with datasource location that i set in Datasource location field of the rendering, i get Data folder also. I need to remove the Data item that comes up in Datasource selection. Attaching the screenshot for the same
This is part of SXA functionality.
Data item represents page relative data source folder
By default you can store data source in:
- global folder
- page relative, under page
if you will remove it you will hide/remove part of the functionality.
If you really want to remove it or show only in a certain scenario, patch this processor or add logic afterward.
<processor type="Sitecore.XA.Foundation.LocalDatasources.Pipelines.GetRenderingDatasource.AddPageDataFolder, Sitecore.XA.Foundation.LocalDatasources" />
in getRenderingDatasource pipeline.
Data folder that you highlighted is virtual until you actually create something underneath, which means it doesn't exist until you create first page relative data source.