Posted by Bevan on April 28, 2009 at 5:42am
Jump to:
| Project: | Color.module: Next generation |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Issue Summary
How well are subthemes supported? For example, can I create a subtheme of colorizable-enabled Acquia Marina and use a custom schema for Acquia Marina? Do I colorize the subtheme or parent theme? Do I need to enable the parent theme?
Comments
#1
When I started coding this, I didn't know what a subtheme was.
Currently, you would have to treat it like a seperate theme. For instance, does Garland inherit Minnelli in Drupal 6?
Now, is it possible? Certainly. But currently themes in Drupal are made to be treated more like seperate entities, you can only inherit certain things.
If you can think of a reasonable implementation and use of sub-theme inheritance, I'm all ears.
*edit*
#2
I had a play around with this to try and work out what you meant. Basically the answer is "no". There is currently no way to have a subtheme inherit it's base themes colorizable-ness.
For example;
So, a feature request then; Add subtheme support to color_soc08! :)
How? Basically, anytime color_soc08 generates a schema, or colorized files (I think this is the same thing?), it needs to recurse up the 'base theme' heirarchy colorizing each parent theme. Usually there is only one level, but there is no technical limit, so we need to assume there are many.
Further, whenever it builds a UI for creating a schema, it needs to recursively get the reference schema for base themes. It's probably useful for it to merge reference colors with the same ID. Then a subtheme can re-use the same colorizable color IDs as the base theme, and/or create it's own.
color_soc08 would also need to allow for the fact that a subtheme may have stated it is colorizable (In order to inherit it's base theme's colorizable-ness), but not have any colorizable elements itself. Therefore it needn't implement hook_color() (Currently color_soc08 assumes that a colorizable theme must implement hook_color()). In this case color_soc08 only works on the base theme's colorizable bits.
(A subtheme that doesn't state color = TRUE in it's .info file is assumed not to support it's base theme's colorizable-ness.)
Lastly, whenever color_soc08 detects that the current theme is using a schema, it would need to replace not only the colorized CSS files for the current theme, but it's base theme too – recursively.
What do you think? Is this something that you think could be added to color_soc08? I don't have sufficient need to work on this myself at this time, however I would be able to test fairly extensively and help you through any subtheming issues or questions you have.
#3
Does this mean a Zen subtheme is not supported at the moment? I am just about to submit one, and wanted to integrate it with this module.
#4
If you color-enable your zen sub-theme it will work fine. However your Zen subtheme will not inherit colorized versions of Zen's CSS and images. This is not a problem for you, since Zen theme currently isn't colorizable (AFAIK) and is not likely to be, given the nature of it.
Lack of support for colorizability in parent themes means that if your sub theme uses a colorized theme (e.g. garland) as a parent theme, then your sub theme will use the parent theme's default color scheme, and not the selected color scheme for that parent theme.
You may also be interested in #444396: Make recolorable, like Garland.