mech Posted November 1, 2015 Share Posted November 1, 2015 (edited) Hey, is it possible to remove the complete Menues only for the Product Details Page? https://screenshot.myvirtualserver.com/Kundenlogin_-_myVirtualserver_-_Google_Chrome_2015-11-01_22.09.54.png thanks for your help. regards, mike Edited November 1, 2015 by mech 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted November 1, 2015 Share Posted November 1, 2015 The sidebar menus provide fast access to some features of your product(s), but if you need to disable it here is how <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1000, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChildren())) { $action = trim($_GET['action']); if ($action!=="productdetails"){ return; } foreach ($primarySidebar->getChildren() as $sidebarItem){ $primarySidebar->removeChild($sidebarItem->getName()); } } }); This will remove all sidebar menus from product details page. 0 Quote Link to comment Share on other sites More sharing options...
mech Posted November 1, 2015 Author Share Posted November 1, 2015 thanks, it will work very good. 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.