0

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?

0
  • 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']

enter image description here

  • 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. – Tofu TheGreat Jul 22 at 3:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.