Monthly Archives: September 2008

Specifying the admin theme for pages in Drupal

Sometimes you want to tell Drupal to use the admin theme on pages other than the ones it decides should be under the admin theme. All you need to do is check the URL in an implementation of hook_init() e.g. function modulename_init(){ if(arg(0) == “whateverpage”){ global $custom_theme; $custom_theme = variable_get(‘admin_theme’, ’0′); } } This is… Read more »

Posted