How to ensure 'Applications' is the selected tab in my modification?

Rob

Well-known member
How to ensure 'Applications' is the selected tab in my modification?

I have a modification which exposes links in the Applications tab on the sidebar of the ACP.

How do I make sure that the applications tab is selected when on my mods admin pages?

I've been trying to hunt this down now for ages :)
 
This is REALLY doing my head in now!

I've made 'directory' a main navigation tab. The route matches fine and calls up an Index action... it all appears as it should... clicking the tab is routed ok and the Index's response template is rendered... except the directory tab is not highlighted and the left navigation doesnt show children (it just shows all 'home' navigation).

I am very confused.
 
Hmmm... any ideas then?

Could the error be in my router?
Code:
<?php
 
class Directory_Route_PrefixAdmin_Directory implements XenForo_Route_Interface
{
    public function match($routePath, Zend_Controller_Request_Http $request, XenForo_Router $router)
    {
        $action = $router->resolveActionWithIntegerParam($routePath, $request, 'id');
        return $router->getRouteMatch('Directory_ControllerAdmin_Directory', $action, 'Index');
    }
    
    public function buildLink($originalPrefix, $outputPrefix, $action, $extension, $data, array &$extraParams)
    {
        return XenForo_Link::buildBasicLinkWithIntegerParam($outputPrefix, $action, $extension, $data, 'id', 'name');
    }
}
 
I do believe the 'Index' should be the value you gave Admin Navigation ID of the category
return $router->getRouteMatch('Directory_ControllerAdmin_Directory', $action, 'Index');
 
Lol, I was thinking that parameter was to specify a 'default' action should none be given in the url but that would obviously be Index in every case. #blondeMoment

*fixed!

Thanks!
 
Top Bottom