First events for adding menu items
This commit is contained in:
parent
e40d503dfb
commit
05991e2206
|
@ -312,11 +312,13 @@ class Action extends HTMLOutputter // lawsuit
|
|||
*/
|
||||
function showPrimaryNav()
|
||||
{
|
||||
$user = common_current_user();
|
||||
|
||||
$this->elementStart('dl', array('id' => 'site_nav_global_primary'));
|
||||
$this->element('dt', null, _('Primary site navigation'));
|
||||
$this->elementStart('dd');
|
||||
$user = common_current_user();
|
||||
$this->elementStart('ul', array('class' => 'nav'));
|
||||
if (Event::handle('StartPrimaryNav', array($this))) {
|
||||
if ($user) {
|
||||
$this->menuItem(common_local_url('all', array('nickname' => $user->nickname)),
|
||||
_('Home'), _('Personal profile and friends timeline'), false, 'nav_home');
|
||||
|
@ -348,6 +350,8 @@ class Action extends HTMLOutputter // lawsuit
|
|||
}
|
||||
$this->menuItem(common_local_url('doc', array('title' => 'help')),
|
||||
_('Help'), _('Help me!'), false, 'nav_help');
|
||||
Event::handle('EndPrimaryNav', array($this));
|
||||
}
|
||||
$this->elementEnd('ul');
|
||||
$this->elementEnd('dd');
|
||||
$this->elementEnd('dl');
|
||||
|
@ -570,6 +574,7 @@ class Action extends HTMLOutputter // lawsuit
|
|||
$this->element('dt', null, _('Secondary site navigation'));
|
||||
$this->elementStart('dd', null);
|
||||
$this->elementStart('ul', array('class' => 'nav'));
|
||||
if (Event::handle('StartSecondaryNav', array($this))) {
|
||||
$this->menuItem(common_local_url('doc', array('title' => 'help')),
|
||||
_('Help'));
|
||||
$this->menuItem(common_local_url('doc', array('title' => 'about')),
|
||||
|
@ -582,6 +587,8 @@ class Action extends HTMLOutputter // lawsuit
|
|||
_('Source'));
|
||||
$this->menuItem(common_local_url('doc', array('title' => 'contact')),
|
||||
_('Contact'));
|
||||
Event::handle('EndSecondaryNav', array($this));
|
||||
}
|
||||
$this->elementEnd('ul');
|
||||
$this->elementEnd('dd');
|
||||
$this->elementEnd('dl');
|
||||
|
|
Loading…
Reference in New Issue
Block a user