diff options
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 32 |
1 files changed, 24 insertions, 8 deletions
@@ -9,18 +9,34 @@ fix_gpc_magic(); menu_build("system"); -$mod = arg(0); - -if (isset($mod) && module_hook($mod, "page")) { - module_invoke($mod, "page"); +if (menu_active_handler_exists()) { + $breadcrumb = menu_get_active_breadcrumb(); + array_pop($breadcrumb); + $title = menu_get_active_title(); + + theme("header"); + theme("breadcrumb", $breadcrumb); + if ($help = menu_get_active_help()) { + $contents = "<small>$help</small><hr />"; + } + $contents .= menu_execute_active_handler(); + theme("box", $title, $contents); + theme("footer"); } else { - if (module_hook(variable_get("site_frontpage", "node"), "page")) { - module_invoke(variable_get("site_frontpage", "node"), "page"); + $mod = arg(0); + + if (isset($mod) && module_hook($mod, "page")) { + module_invoke($mod, "page"); } else { - theme("header"); - theme("footer"); + if (module_hook(variable_get("site_frontpage", "node"), "page")) { + module_invoke(variable_get("site_frontpage", "node"), "page"); + } + else { + theme("header"); + theme("footer"); + } } } |