cuddylier Posted June 4, 2017 Share Posted June 4, 2017 Hi I want to hide the 'Client Details' part of the 'ClientAreaPrimarySidebar' but only for sub-account contacts, not for the main account owner. How would I achieve this for logged in contacts? I know I can achieve it for the main account owner by following what's here: https://forum.whmcs.com/showthread.php?111958-How-hide-client-details-sidebar-in-client-area but I don't wish to do that. Thanks 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted June 5, 2017 Share Posted June 5, 2017 I want to hide the 'Client Details' part of the 'ClientAreaPrimarySidebar' but only for sub-account contacts, not for the main account owner.How would I achieve this for logged in contacts? I know I can achieve it for the main account owner by following what's here: https://forum.whmcs.com/showthread.php?111958-How-hide-client-details-sidebar-in-client-area but I don't wish to do that. so as per the above thread, to hide the Clients Details sidebar for everyone, you would use... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Client Details'))) { $primarySidebar->removeChild('Client Details'); } }); but to do what you want to do and hide it from subaccounts only, i'd suggest using this... <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { GLOBAL $smarty; $contactid = $smarty->getVariable('loggedinuser')->value['contactid']; if ($contactid && !is_null($primarySidebar->getChild('Client Details'))) { $primarySidebar->removeChild('Client Details'); } }); 0 Quote Link to comment Share on other sites More sharing options...
Alien Hosting Posted July 5 Share Posted July 5 hello i have tried so many options for a hook to remove the contacts from sidebar in the client area account details. could someone help me with a hook for this? 0 Quote Link to comment Share on other sites More sharing options...
WhmTools Posted July 8 Share Posted July 8 You should be able to do it using the hook https://developers.whmcs.com/hooks-reference/client-area-interface/#clientareasecondarynavbar 0 Quote Link to comment Share on other sites More sharing options...
Alien Hosting Posted July 11 Share Posted July 11 On 7/8/2024 at 8:22 AM, WhmTools said: You should be able to do it using the hook https://developers.whmcs.com/hooks-reference/client-area-interface/#clientareasecondarynavbar would you be willing to write this hook for me? im new to whmcs, i know where to put the hook but i dont know alot about writing the hooks 0 Quote Link to comment Share on other sites More sharing options...
Alien Hosting Posted July 11 Share Posted July 11 On 7/8/2024 at 8:22 AM, WhmTools said: You should be able to do it using the hook https://developers.whmcs.com/hooks-reference/client-area-interface/#clientareasecondarynavbar every hook i tried to use didnt work, im lost at this point 0 Quote Link to comment Share on other sites More sharing options...
WhmTools Posted July 17 Share Posted July 17 Please send me a PM, and let me see how I can help you 0 Quote Link to comment Share on other sites More sharing options...
Alien Hosting Posted July 26 Share Posted July 26 On 7/17/2024 at 4:12 AM, WhmTools said: Please send me a PM, and let me see how I can help you i have sent you a DM 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.