[Idea] Extend modules addable to a theme #35146
ga-devfront
started this conversation in
Ideas
Replies: 1 comment
-
Interesting idea. I remember that in veeeery old days when I used to work with WordPress it was popular to use this: to set some rules for plugins included inside a theme. I agree that it is something interesting and possibly quite easy to implement on theme.yml level. Your alternative approach is also interesting but not that developer-friendly. That being said, I'm sure that even if we agree on this idea you would need to get us some back-end dev to help :D |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
The problem
Currently only modules dependent on the theme can be integrated with it.
Dependent module means installing with the theme and deactivated when not using the theme.
It is true to think that in the first place a dependent module is closely linked to the theme. But this is not necessarily the case, let's take for an example a theme that integrates a page modifier (page builder or other). The theme needs it but this module can be used by other themes as well!
So I think it would be good to have other ways to integrate modules into our themes without them necessarily being deactivated when we change themes.
The solution
modify the
dependencies.modules
configuration field with a modules field which would include the fields:ideas proposed by @Leli
It might also be necessary to review the folder structure in order to add the modules.
Alternatives
An alternative would rather be on the module side where we could add an option to it which would allow it not to be deactivated at the theme switch but only manually from the module management page.
Additional context
I am currently encountering the problem on my side, I found an alternative to get around the problem but it is not very clean (I modify on the fly before changing the theme the configuration file saved in JSON format to remove my module from the dependencies) and I think this is a feature that could interest a lot of theme developers.
Do you plan to work on this subject?
Beta Was this translation helpful? Give feedback.
All reactions