SVN commit 1092529 by bcooksley: Add support for hidden sections, to allow breadcrumb navigation M +10 -3 class_menu.inc --- trunk/www/media/includes/classes/class_menu.inc #1092528:1092529 @@ -45,9 +45,9 @@ $this->name = $name; } - function &appendSection ($name,$link='') + function &appendSection ($name,$link='',$hidden = false) { - $section = new MenuSection ($this->menu_root, $this->menu_baseurl, $this->current_relativeurl, $name, '', $link); + $section = new MenuSection ($this->menu_root, $this->menu_baseurl, $this->current_relativeurl, $name, '', $link, $hidden); $this->items[] =& $section; return $section; @@ -114,8 +114,9 @@ var $current_relativeurl; var $link; var $active; + var $hidden; - function MenuSection ($menu_root, $menu_baseurl, $current_relativeurl, $name, $id = "", $link) + function MenuSection ($menu_root, $menu_baseurl, $current_relativeurl, $name, $id = "", $link, $hidden) { if (substr ($link, -1) != "/") $link = $link."/"; @@ -134,6 +135,8 @@ } else { $this->active = false; } + + $this->hidden = $hidden; } function appendLink ($name, $link, $relative_link = true, $is_dir = false, $icon = false, $new = false) @@ -157,6 +160,10 @@ function show () { global $template_menulist1, $template_menulist2, $template_menulist3, $templatepath; + if( $this->hidden ) { + return; + } + print $template_menulist1."\n"; if ($templatepath == "chihuahua/") print '

'.$this->name."

\n";