1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cannot Create Navtabs

Discussion in 'XenForo Development Discussions' started by James, May 31, 2011.

  1. James

    James Well-Known Member

    I'm not sure if the code has changed, but this isn't creating a new navtab for me:
    Code:
    class MyTab_Listener_Navigation
    {
    public static function navtabs(array &$extraTabs, $selectedTabId)
    {
    $extratabs['MyTab'] = array(
    'title' => 'My Tab',
    'href' => XenForo_Link::buildPublicLink('mytab'),
    'position' => 'end',
    'selected' => ($selectedTabId == 'MyTab')
    );
    }
    }
    
    I have my listener set up to execute MyTab_Listener_Navigation::navtabs.

    Can a fresh set of eyes see what I'm doing wrong, if anything? :D

    EDIT: Woops, I noticed I didn't camelcase my extraTabs array. /facepalm
     

Share This Page