summaryrefslogtreecommitdiffstats
path: root/index.php
diff options
context:
space:
mode:
authorDries Buytaert2003-11-08 09:56:22 (GMT)
committerDries Buytaert2003-11-08 09:56:22 (GMT)
commit92995414b4c4bbecc9ef13dba29009e02cf951a7 (patch)
treebc340c0cbe66913a150851381cb31a984fe6b16d /index.php
parent432852fbb8ae331408cb53ad7a678c5499173893 (diff)
- Committed stage 1 of the menu callbacks improvements. Patch by Jonathan.
Diffstat (limited to 'index.php')
-rw-r--r--index.php32
1 files changed, 24 insertions, 8 deletions
diff --git a/index.php b/index.php
index 35f865a..b4834e9 100644
--- a/index.php
+++ b/index.php
@@ -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");
+ }
}
}