webbymaster Posted July 18 Share Posted July 18 Hello. I have two main menu items that I would like to move to other menus as a submenu. Open Ticket (/submitticket.php ) in Support, and Domain WHOIS in Domains. I have a hook for Domain WHOIS, but I do not know what to specify (( Please tell me. Here is a hook for Domain WHOIS: <?php require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . "configs" . DIRECTORY_SEPARATOR . "common.php"; use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { logModuleCall('domainwhois', 'ClientAreaPrimaryNavbar', [], null, null, null); $newMenu = $primaryNavbar->addChild( BRAND_NAME_WHOIS, array( 'name' => BRAND_NAME_WHOIS, 'uri' => 'index.php?m=domainwhois', 'order' => 99 ) ); }); 0 Quote Link to comment Share on other sites More sharing options...
WhmTools Posted July 19 Share Posted July 19 You can achieve it by the hook ClientAreaPrimarySidebar. You can add a menu using the function addChild. Also you can remove the menus from a section using the function removeChild. 0 Quote Link to comment Share on other sites More sharing options...
webbymaster Posted July 19 Author Share Posted July 19 (edited) Quote You can achieve it by the hook ClientAreaPrimarySidebar. You can add a menu using the function addChild. Also you can remove the menus from a section using the function removeChild. I just don't know how to write hooks correctly (( Edited July 19 by webbymaster 0 Quote Link to comment Share on other sites More sharing options...
webbymaster Posted July 20 Author Share Posted July 20 (edited) Can someone tell me how to write the correct hooks for my question? In the Domain WHOIS hook I gave, you need to register something so that this item is added as a submenu in the "Domains" menu. And the menu item "Open Ticket", move as a submenu to the menu item "Support". I do not know how to do this. (( Maybe there are ready-made examples with which I can solve my question? I would be very grateful. There is an option to implement this through the "Advanced Menu Manager" module, but I would like to understand how to do this using hooks. And I would not like to load the system with modules. Edited July 20 by webbymaster 0 Quote Link to comment Share on other sites More sharing options...
webbymaster Posted July 29 Author Share Posted July 29 Can't anyone help me write these hooks? 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.