XF 2.0 Question about Setting the Section Links in the Header

robdog

Well-known member
I am creating a pretty custom app around XenForo and I have figured out how to create a completely new nav bar with dropdown links for those new nav items. However, once I select a top nav element, I am not sure how to set the sub nav options for the select option.

This is how I am creating my custom nav:
Code:
    public static function extend(\XF\Pub\App $app, array &$params, \XF\Mvc\Reply\AbstractReply $reply, \XF\Mvc\Renderer\AbstractRenderer $renderer)
    {
        if (!empty($params['view']) && in_array($params['view'], self::$_controllerCheck)) {
            $params['navTree'] = self::_buildNavigation();
        }
    }

    protected static function _buildNavigation()
    {
        return [
            'dashboard' => [
                'title' => 'Dashboard',
                'href' => '/dashboard/'
            ],

So when someone selects the "dashboard" option I won't have any sub nav options but it appears to be using the forum home subnav options.

Any help would be greatly appreciated. Thanks.
 
Top Bottom