Closed (fixed)
Project:
Genesis
Version:
6.x-1.2
Component:
Miscellaneous
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
8 Jan 2009 at 08:35 UTC
Updated:
22 Jun 2011 at 20:02 UTC
So i have been working on my site, and created my "perfect" layout. My site actually is comprised of 4 sub sites, all with the same layout, but i want to change the color elements. IS there a way to sub theme, my sub theme?
Comments
Comment #1
Jeff Burnz commentedYes, in the .info file for your subtheme of a subtheme change the base theme from genesis to the name of the subtheme you want to act as the new parent theme. Normally the base theme = genesis, but you'll want to change this to base theme = mysubtheme (this effectively becomes the new parent theme).
Now, because your original subtheme uses "base theme = genesis", and the new sub-subtheme uses "base theme = mysubtheme", the sub-subtheme inherits all of the resources of both themes.
In fact in the new sub-subtheme all you really need is a .info file and a CSS file. You could strip the CSS file right back to only the necessary styles that you need. You'll noitce if you view source the sub-subthemes CSS file is loaded last.
Comment #2
Jeff Burnz commentedComment #3
EugenMayer commentedWhat out when you create a subtheme of a subtheme. The settings of the base theme are no longer inheritted.
Comment #4
Jeff Burnz commentedWhat do you mean by "settings"; each theme has its own settings/configuration. Not sure what you mean.
Comment #5
EugenMayer commentedEach theme can have a theme-settings.php. When you create a subtheme, you inherit all settings from your base theme. That means you can select differen values for the subtheme and bastheme AND you dont need to define all that settings in the subthemes ( FAPI like ).
This behavior is not kept alive when you make a subtheme of a subtheme
Comment #6
Jeff Burnz commentedActually sub themes don't automatically inherit advanced theme settings, http://drupal.org/node/225125
There's two ways around it - 1) repeat everything in the sub themes, or 2) merge the base themes settings into the sub themes.
I used option 2 in Adaptivetheme, and Zen does this also. The main reason why I never thought or wanted to support this in Genesis is that its meant to be a pretty simple theme.
Comment #7
Jeff Burnz commentedCleaning up.