XF 1.2 How to change navigation menu items of custom addons


Well-known member
Still bemoaning the fact that XF 1.3 will not get a navigation manager... So heres my question.

How do i add, remove menu items from addons that appear on my navigation? Is there an easy way to change the order? Can someone please provide some guidance.

For example, on my site : http://www.nzwarriors.com/ i want to remove the following bolded sub items :
Player Profile -> Most Active Members

Do i need to contact the addon developer in each instance?


Well-known member
Do all addons that create a menu item have a *tab_links template? As in that is that the standard naming convention used or is that upto the developer?
Yes (if they are doing it correctly). Its one of the arguments of the navigations_tabs listener (see below).

Callback signature:

array &$extraTabs, $selectedTabId

  1. array &$extraTabs - you may push additional tabs onto this array. Each tab must be identified with a unique key (see $selectedTabId) and be an array with the following keys:
    • title - title for the main tab
    • href - link for the root of the tab
    • position - currently 'home', 'middle', or 'end'. This controls where the tab will show up in the navigation.
    • linksTemplate - the name of the template that contains the links that will be displayed in the second row. The outer HTML of this template should be a <ul class="secondaryContent blockLinksList">.
  2. string $selectedTabId - the name of the selected tab. Select your tab if this matches.

This is an example of a basic callback:

public static function navigationTabs(array &$extraTabs, $selectedTabId)
    $visitor = XenForo_Visitor::getInstance();

    if ($visitor->hasPermission('nfljsc', 'viewShowcase'))
        $extraTabs['showcase'] = array(
            'title' => new XenForo_Phrase('nflj_showcase_menu_main_tab'),
            'href' => XenForo_Link::buildPublicLink('showcase'),
            'position' => 'middle',
            'counter' => $counter,
            'linksTemplate' => 'nflj_showcase_tab_links'