Chris J. Lee

Dallas Drupal Developer

You are here

Commerce kickstart install screen

I would really like to saw what a great job commerce guys have done with their distro. The install screen looks great! This brings me to the question. How did that do this trick and inject fun css into the install profile?

The trick lies in the $_GLOBAL['theme'] variable in the install profile.

/**
* Task callback: shows the welcome screen.
*/
function _commerce_kickstart_set_theme($target_theme) {
if ($GLOBALS['theme'] != $target_theme) {
unset($GLOBALS['theme']);

drupal_static_reset();
$GLOBALS['conf']['maintenance_theme'] = $target_theme;
_drupal_maintenance_theme();
}
}

© 2017 Chris J. Lee