Toxyy wrote: ↑
Mon Oct 30, 2017 7:57 pm
I agree that this should be added but how should it be implemented?
It could mimic the way WordPress does it with child themes. If the Child Extension has a file with the same name as the parent's, then it should override it.
Ger wrote: ↑
Tue Oct 31, 2017 8:53 am
What I would like to do - say if I have an extension named "Ger" - is to make a new folder in the extensions directory and create a child extension "GerChild".
It will be a child extension, just because in the configuration file I will reference the parent that I want it to have. In this case "Ger".
Ultimately, what I want to achieve is to put in GerChild the same files with the same folders and names as in Ger and cancel / override those of the parent i.e. "if there is a child and if the child has that then don't use the parent's".
The goal is obvious - I want to be able to keep my changes, that's all. Whenever the parent gets updated, I get to keep my changes in the child.
Sure the child might break, however, that's also a risk with child themes, isn't it (although broken html /css isn't as hazardous)?
david63 wrote: ↑
Tue Oct 31, 2017 4:47 pm
The problem that I see from an extension developer's perspective is that if I change my extension and there is a "child" extension using that extension then there is a possibility that the child extension would stop working thereby creating problems for the child extension developer and possibly the parent extension developer.
As Ger says there is nothing to stop anyone creating their own template files for any extension either to add additional features or to work better with a particular style.
There are other, and in my opinion better, ways of achieving this:
- You ask the original extension developer if they will incorporate your changes.
- You fork the original extension and create another one with your changes in it.
- You can even ask the original extension developer to add events in their extension for you to use.
As I see this it would probably only be used for "one off" changes by individual users and if the changes were more significant then it should be a new extension.
There would also be potential validation issues.
The problems with your suggestion are that (1) for every little thing I have to poke the original developer and (2) that if I fork the original extension then I'll have to be the one to update and keep track of the changes in the original one.
Also, if create my own template files and / or CSS for an extension, when it gets updated I will lose it all, isn't that right
Finally, it's true that a child extension may stop working, but
(1) the parent can be normally updated and shouldn't be affected at all (i.e. we can disable the child and continue working using the parent)
(2) that's a risk that we should be willing to take in favor of customization and
(3) we already have child themes that can break if the parent gets updated, isn't that right?