Adding a button on primarynav

Hello,
I would like to add a button in the primary nav linking to another website, is there any mean to do that without passing through a plug-in?
I'm trying to figure out a way to do that.
Ranto

Comments

  • @ranto a plugin is the best way.
  • @jordanc
    Can you give me an example of syntax that can be used?
    Because I did not fully understand the sample plugin on Wiki.
    Or If somebody does have already this kind of plug-in. That would be great.
    Thanks a lot for your collaboration,
    Regards,
    ranto
  • @ranto Unfortunately beyond the wiki I'm not sure, I've never developed a plugin myself. You may have better luck taking a look at some of the existing plugins in the plugins directory for inspiration.
  • @jordanc
    Actually I have a clue but I do not know how to insert a page inside the common_local_url.
    The plugin should be like this:
    function showPrimaryNav()
    {
    $user = common_current_user();
    $this->elementStart('dl', array('id' => 'site_nav_global_primary'));
    // TRANS: DT element for primary navigation menu. String is hidden in default CSS.
    $this->element('dt', null, _('Primary site navigation'));
    $this->elementStart('dd');
    $this->elementStart('ul', array('class' => 'nav'));
    if (Event::handle('StartPrimaryNav', array($this))) {
    if ($user) {
    // TRANS: Link to go to an external page
    $tooltip = _m('TOOLTIP', 'go to mypage');
    $this->menuItem(common_local_url('mypage.php'),
    }
    Event::handle('EndPrimaryNav', array($this));
    }
    $this->elementEnd('ul');
    $this->elementEnd('dd');
    $this->elementEnd('dl');
    But now how to insert another page inside common_local_url , because statusnet does not accept other page (really weird :( )
    BR,
    Ranto
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID