suportgc Posted August 30, 2017 Share Posted August 30, 2017 Good afternoon friends. I wonder how I can hide some parts of the affiliate area. The first is the affiliates menu, I would like to only show it to affiliate clients as I do not intend to expose this tab. I just want anyone who is already affiliated to have access to the tab and menu. Another item that you would like to hide is the link for nomination. They will not be indicated via link, and in order not to confuse the affiliates, I intend to remove this information. Follow prints for better understanding. Can you help me? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 30, 2017 Share Posted August 30, 2017 Good afternoon friends.I wonder how I can hide some parts of the affiliate area. The first is the affiliates menu, I would like to only show it to affiliate clients as I do not intend to expose this tab. I just want anyone who is already affiliated to have access to the tab and menu. use the hook in the thread below to remove the affiliates navbar link for those who are not logged in. https://forum.whmcs.com/showthread.php?115015-change-the-menu-of-logged-out-users&p=465402#post465402 Another item that you would like to hide is the link for nomination.They will not be indicated via link, and in order not to confuse the affiliates, I intend to remove this information. Follow prints for better understanding. Can you help me? i'm not quite sure what it is you want to do, but the image is from affiliates.tpl and so that is a file that you can edit... if you just want to change the text, you can use Language Overrides. 0 Quote Link to comment Share on other sites More sharing options...
suportgc Posted August 30, 2017 Author Share Posted August 30, 2017 use the hook in the thread below to remove the affiliates navbar link for those who are not logged in. https://forum.whmcs.com/showthread.php?115015-change-the-menu-of-logged-out-users&p=465402#post465402 i'm not quite sure what it is you want to do, but the image is from affiliates.tpl and so that is a file that you can edit... if you just want to change the text, you can use Language Overrides. Hello, Brian. Thank you for the tips. I would like to just hide so that you are not affiliated. I want to display this menu only for affiliates. Is it possible ? 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted August 30, 2017 Share Posted August 30, 2017 <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { $client = Menu::context('client'); $affid = $client->affiliate->id; if (is_null($affid) and !is_null($primaryNavbar->getChild('Affiliates'))) { $primaryNavbar->removeChild('Affiliates'); } }); 0 Quote Link to comment Share on other sites More sharing options...
suportgc Posted August 30, 2017 Author Share Posted August 30, 2017 Perfect. Thank you very much 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.