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

Cannot Create Navtabs

James

Well-known member
#1
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