getstreamhosting Posted May 10, 2016 Share Posted May 10, 2016 I went to add a new link into the menu in the clients area under "support". Is there a simple way to do this? Or is there a lot more to it, then something easy? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 10, 2016 Share Posted May 10, 2016 it depends if you think using an action hook is simple or not! http://docs.whmcs.com/Client_Area_Navigation_Menus_Cheatsheet#Adding_an_Additional_Child_Menu_Item 0 Quote Link to comment Share on other sites More sharing options...
getstreamhosting Posted May 10, 2016 Author Share Posted May 10, 2016 I guess it would be "not". Do I need to create a new file somewhere? Do I edit a file ? Where exactly does one insert that piece of code at? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted May 10, 2016 Share Posted May 10, 2016 create a new .php file in includes/hooks/ and paste the code into it... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { $client = Menu::context('client'); if (!is_null($client) && !is_null($primaryNavbar->getChild('Support'))) { $primaryNavbar->getChild('Support') ->addChild('New Link', array( 'uri' => 'http://www.google.com', 'label' => 'New Link', 'order' => 100)); } }); 0 Quote Link to comment Share on other sites More sharing options...
getstreamhosting Posted May 10, 2016 Author Share Posted May 10, 2016 Ah okay, So then you "Create a new file" place in /includes/hooks/ folder (newfile.php) and place the code in it, and the info of where you want it (example from your piece of code there) Support for the support menu... Thank you for the info. That helps very much! Now I just need to get the client area "theme" wrapped around a new file. 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.