Detail
#24419
Multiple inheritance for themes
Currently, the most a theme can do is directly extend another theme. However, if a new theme "Theme new" should use once the structure of the Modern theme (with the header) and once that of the Sidebar theme (with the sidebar), then currently the entire "Theme new" must be duplicated.
It should be possible to inherit from multiple themes. For example, there can be an abstract "Theme new" which contains the common features of "Theme new (modern)" and "Theme new (sidebar)" (CSS, images etc.), so that they exist only once. Or a Modern based "Theme new (modern)" which is extended by "Theme new (sidebar)". When calculating the required resources, they should be included only once. This means that if a theme is created that inherits from Sidebar and from Modern, Modern will only be included once (since Sidebar is based on Modern).
Test
- manually:
- "Select Discreet (Modern). Expectation: The theme should be in Modern layout (navigation on top) and color in Decent theme (with blue as accent color).
- Select "Discreet (Sidebar)". Expectation: The theme should be in the Sidebar layout (navigation on the left) and colored in the Decent theme.
- "Discreet" is not selectable.
- The other themes like "Modern", "Sidebar", "Glossy" etc. have not changed in layout or color.
- automatic: TestTheme.testMultipleInheritance()