Skip to content

Instantly share code, notes, and snippets.

@mglaman
Created March 11, 2014 22:09
Show Gist options
  • Save mglaman/9496195 to your computer and use it in GitHub Desktop.
Save mglaman/9496195 to your computer and use it in GitHub Desktop.
Allows you to define a theme_callback and change default theme. Useful when using Admin theme for node/edit, but you want forums to use default.
<?php
/**
* Implements hook_menu_get_item_alter().
*/
function mymodule_menu_get_item_alter(&$router_item, $path, $original_map) {
if ($router_item['path'] == 'node/add/forum') {
$router_item['theme_callback'] = 'mymodule_menu_theme_callback';
}
}
function mymodule_menu_theme_callback() {
return 'default_theme';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment