Skip to main content

Articles tagged with "admin theme"

Setting default drupal theme during installation : programatically install a drupal theme

25th Mar 2011

Here's a quick post that will be a reminder for us as much as anyone else! Setting the default theme during installation using an installation profile is surprisingly hard in Drupal 6, and easier though not obvious in Drupal 7. In Drupal 6, we used the wonderful Install Profile API module, which allowed us to do it in just a few lines in an install task:

  install_enable_theme(array('my_theme', 'garland', 'rubik'));

In Drupal 7, here's the code I use in my install task:

  // Any themes without keys here will get numeric keys and so will be enabled,...
Read more