[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: www/media/includes/classes
From: Ben Cooksley <sourtooth () gmail ! com>
Date: 2010-02-19 8:29:40
Message-ID: 1266568180.428708.27473.nullmailer () svn ! kde ! org
[Download RAW message or body]
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 '<h2 id="cp-menu-'.$this->id.'"><a href="'.$this->link.'">'.$this->name."</a></h2>\n";
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic