We have multiple sites. And for each site has content folder called "data"
. Our client wants that if he is going to add a rendering component to the page, the datasource would be coming from the data
folder of the current editing site. But if he is going to change the content of a particular existing rendering component from the site, the datasource should be coming from the data
folder of ALL SITES. Is this possible?
1 Answer
To return the datasource from "Data" folder of the current editing site, add below query in "Datasource Location" in rendering level:
query:./ancestor-or-self::*[@@templatename='Site Root']/Global/Data
To return the datasource from the "Data" folder of all sites you use this query:
query:..//*[@@templatename='Data template name']
-
Hi thanks for this. I am already done with this and what I need is the flexibility of the datasource. When adding component, it should show different datasource. When editing that component, it will show different datasource. Jul 22, 2019 at 3:16
-