diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-11-08 09:56:22 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-11-08 09:56:22 +0000 |
commit | 92995414b4c4bbecc9ef13dba29009e02cf951a7 (patch) | |
tree | bc340c0cbe66913a150851381cb31a984fe6b16d /index.php | |
parent | 432852fbb8ae331408cb53ad7a678c5499173893 (diff) | |
download | brdo-92995414b4c4bbecc9ef13dba29009e02cf951a7.tar.gz brdo-92995414b4c4bbecc9ef13dba29009e02cf951a7.tar.bz2 |
- Committed stage 1 of the menu callbacks improvements. Patch by Jonathan.
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"); + } } } |