Open Menu Links in New Tabs

This information only applies to self-hosted WHMCS installations. WHMCS Cloud does not currently support this customization method.

You can customize the Client Area’s navigation menus through hooks and custom modules.

For more information about customizing the Client Area’s navigation menus, see Client Area Navigation Menus and our Developer Documentation.

You can open links in a new browser window using the setAttribute method.

Example

For example, if you are using an external system to control your knowledge base, you could use the following code:

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) {
    $navItem = $primaryNavbar->getChild('Knowledgebase');
    if (is_null($navItem)) {
        return;
    }
    $navItem->setUri('https://www.example.com/3rdpartyknowledgebasesystem');
    $navItem->setAttribute("target", '_blank');
});

Last modified: 2025 October 17