Added EVENT to homestubnav
Changed menu->submenu(). if (! $menu->getItems()) then do nothing
This commit is contained in:
parent
a45cdae083
commit
2a0a0287d4
|
@ -49,13 +49,17 @@ class HomeStubNav extends Menu
|
||||||
{
|
{
|
||||||
function getItems()
|
function getItems()
|
||||||
{
|
{
|
||||||
return array(array('top',
|
if (Event::handle('StartHomeStubNav', array(&$this->action))) {
|
||||||
array(),
|
return array(array('top',
|
||||||
// TRANS: Menu item in personal group navigation menu.
|
array(),
|
||||||
_m('MENU','Home'),
|
// TRANS: Menu item in personal group navigation menu.
|
||||||
// TRANS: Menu item title in personal group navigation menu.
|
_m('MENU','Home'),
|
||||||
// TRANS: %s is a username.
|
// TRANS: Menu item title in personal group navigation menu.
|
||||||
_('Back to top'),
|
// TRANS: %s is a username.
|
||||||
'nav_return_top'));
|
_('Back to top'),
|
||||||
|
'nav_return_top'));
|
||||||
|
Event::handle('EndHomeStubNav', array(&$this->action));
|
||||||
|
}
|
||||||
|
return Null;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -150,6 +150,8 @@ class Menu extends Widget
|
||||||
|
|
||||||
function submenu($label, $menu)
|
function submenu($label, $menu)
|
||||||
{
|
{
|
||||||
|
if(!$menu->getItems())
|
||||||
|
return;
|
||||||
$this->action->elementStart('li');
|
$this->action->elementStart('li');
|
||||||
$this->action->element('h3', null, $label);
|
$this->action->element('h3', null, $label);
|
||||||
$menu->show();
|
$menu->show();
|
||||||
|
|
Loading…
Reference in New Issue
Block a user