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
1 Answer
This is part of SXA functionality.
Data item represents page relative data source folder
By default you can store data source in:
- global folder
/sitecore/content/T/S/Data/Texts/Text1
- page relative, under page
/sitecore/content/T/S/Home/tests/Data/Text2
)
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.
Note
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.