Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Confirm purpose of module #7

Open
brynwhyman opened this issue Dec 4, 2018 · 4 comments
Open

Confirm purpose of module #7

brynwhyman opened this issue Dec 4, 2018 · 4 comments

Comments

@brynwhyman
Copy link

brynwhyman commented Dec 4, 2018

This repository readme implies that:

This module adds subsite support for
elemental.

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.

@adrexia
Copy link
Contributor

adrexia commented Dec 4, 2018

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.

@robbieaverill
Copy link
Contributor

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

@adrexia
Copy link
Contributor

adrexia commented Dec 4, 2018

@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). 🤔

@robbieaverill
Copy link
Contributor

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: silverstripe/silverstripe-subsites#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 =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants