Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would create a Sky sub theme bases on original project files and themesettings preferences, but with different colours for each subtheme.
Wich files should be overridden in the subtheme directory?
OK after some try and some studies on Zen theme... I've got a solution.
With this modification you'll be able to create subdirectories into sky theme dir, then copying style.css, images/ and css/ directories.
Doing this will be enough to have a new theme based on sky with its preferences (for menus, breadcrumb fonts and other settings).
template.php must be edited like this:
/*
* Initialize theme settings
*/
if (is_null(theme_get_setting('sky_layout'))) {
global $theme_key;
// Save default theme settings
$defaults = array(
'sky_breadcrumbs' => 0,
'sky_breadcrumbs_sep' => '»',
'sky_font' => 'lucida',
'sky_font_headings' => 'lucida',
'sky_font_size' => '12px',
'sky_header_height' => 'auto',
'sky_layout' => 'fixed_960',
'sky_title' => 1,
'sky_nav_alignment' => 'center',
'sky_sub_navigation_size' => '15em',
'sky_wireframe' => 0,
);
$defaults = variable_get('theme_sky_settings' , $defaults);
variable_set(
str_replace('/', '_', 'theme_'. $theme_key .'_settings'),
array_merge($defaults, theme_get_settings($theme_key))
);
// Force refresh of Drupal internals
theme_get_setting('', TRUE);
}
// Appearance Stylesheet. Controls the colors, fonts and borders of the theme
if (theme_get_setting('sky_wireframe') == 0) {
global $theme_key;
if ($theme_key == 'sky') {
drupal_add_css(path_to_theme() .'/css/appearance.css', 'theme', 'all', TRUE);
}
else {
drupal_add_css(path_to_theme() . '/' . $theme_key . '/css/appearance.css', 'theme', 'all', TRUE);
}
}
I've also attached a patch but I dunno if done correctly... :p
I've been trying to get a sub theme working in Sky too. I'm using 6.x-2.x-dev. I edited template.php as suggested above, but that didn't do the trick. Any suggestions?
Comments
Comment #1
tassoman CreditAttribution: tassoman commentedOK after some try and some studies on Zen theme... I've got a solution.
With this modification you'll be able to create subdirectories into sky theme dir, then copying style.css, images/ and css/ directories.
Doing this will be enough to have a new theme based on sky with its preferences (for menus, breadcrumb fonts and other settings).
template.php must be edited like this:
I've also attached a patch but I dunno if done correctly... :p
Comment #2
tassoman CreditAttribution: tassoman commentedComment #3
JacineThanks for the patch tassoman ;)
I assume this apples to the D6 version as well...
I'll be testing it out asap!
Comment #4
bryanhirsch CreditAttribution: bryanhirsch commentedI've been trying to get a sub theme working in Sky too. I'm using 6.x-2.x-dev. I edited template.php as suggested above, but that didn't do the trick. Any suggestions?
Comment #5
JacineCan someone please retest this with the new version? I'm running out of time to work on this, and could use some help here :)
Comment #6
JacineActually, don't think this applies anymore since there is no appearance.css file anymore. Let me know if that's wrong.