Open brynwhyman opened 5 years ago
I'm unsure if really requires ElementalSubsiteExtension
, since there is nothing "elemental" about what that extension is doing. It has been used in the past when filtering Elemental ModelAdmins by Subsite. But there are at least 2 other more generic modules that also do this.
It looks like ElementalSubsitesPageExtension
exists to support the "copy page to subsite" functionality, by copying each of a page's associated elements.
Yeah true. I feel like this module is useful when used with the virtual module that allows unversioned many manys so you can use elements on multiple pages. Elemental also used to have a ModelAdmin for managing blocks outside of a page context, as @adrexia mentioned - the combination of those two things might have required elements to have a subsite ID on them, but since they're always owned by pages nowadays we probably don't need the module any more
@robbieaverill Does copying the page to a subsite copy elements, without needing ElementalSubsitesPageExtension
? I mean, really that shouldn't be tied to subsites - the same should apply to duplicating pages inside a single sitetree.
So, in summary ElementalSubsiteExtension
isn't really elemental specific, and ElementalSubsitesPageExtension
isn't really subsite specific (or it shouldn't be). 🤔
Duplication across subsites should be handled under the hood by the framework. The logic for duplicating a page across subsites is in subsites already, but there is a bug in elemental for it not duplicating the elements: https://github.com/silverstripe/silverstripe-subsites/issues/393
Last time I looked at this module I think I saw that it adds the subsite extension to BaseElement, and we found a bug with elemental v4 recently where you couldn't add elements in a subsite because of it - it needs to add the extension to ElementalArea as well.
Hope this helps =)
This repository readme implies that:
Given that it's been confirmed in the dnadesign/elemental repo here that subsite compatibility with elemental blocks is possible without this module, this issue is to track some time to investigate how this module provides support as the readme suggests.