Define custom theme for a path

Public

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.

</> CopyGet raw version
php
  1. <?php
  2.  
  3. /**
  4.  * Implements hook_menu_get_item_alter().
  5.  */
  6. function mymodule_menu_get_item_alter(&$router_item, $path, $original_map) {
  7. if ($router_item['path'] == 'node/add/forum') {
  8. $router_item['theme_callback'] = 'mymodule_menu_theme_callback';
  9. }
  10. }
  11.  
  12. function mymodule_menu_theme_callback() {
  13. return 'default_theme';
  14. }