diff options
author | Dries Buytaert <dries@buytaert.net> | 2003-09-26 10:04:09 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2003-09-26 10:04:09 +0000 |
commit | f104d3cc12134fc574373d6a643d9c84a317de44 (patch) | |
tree | 838bcdb9cff17d43ec39a5ebdfd3274916839580 /includes | |
parent | 645d026e098a4dccef1bbbf0e40b9eecc8599daa (diff) | |
download | brdo-f104d3cc12134fc574373d6a643d9c84a317de44.tar.gz brdo-f104d3cc12134fc574373d6a643d9c84a317de44.tar.bz2 |
- Committed the admin menu integration patch. Thanks Adrian, Stefan and others.
Diffstat (limited to 'includes')
-rw-r--r-- | includes/menu.inc | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/includes/menu.inc b/includes/menu.inc index 617e9ed22..18a6e5aca 100644 --- a/includes/menu.inc +++ b/includes/menu.inc @@ -46,6 +46,17 @@ function menu_item($in_path) { return "<a href=\"". url($in_path) ."\"$css>". t($_gmenu[$in_path]["title"]) ."</a>"; } +function menu_title($in_path = null) { + global $_gmenu; + + if ($in_path == null) { + $trail = menu_trail(); + $in_path = array_pop($trail); + } + + return ucfirst($_gmenu[$in_path]["title"]); +} + function menu_trail() { global $_gmenu; static $trail; // cache @@ -72,13 +83,13 @@ function menu_path() { $trail = menu_trail(); - $links = array(); + $links[] = l(t("Home"), ""); foreach ($trail as $item) { $links[] = menu_item($item); } - return implode(" » ", $links); + return $links; } function menu_help() { |