kacm Posted January 20, 2016 Share Posted January 20, 2016 Hi, I have a trouble. How can I add :active class in navigation menu? I am using a six template. Is it possible with hooks? Greetings 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted January 20, 2016 Share Posted January 20, 2016 http://forum.whmcs.com/showthread.php?107958-Edit-whmcs-6-custom-sidebar-and-link&p=442638#post442638 0 Quote Link to comment Share on other sites More sharing options...
kacm Posted January 21, 2016 Author Share Posted January 21, 2016 Thanks for reply <?php use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimarySidebar', 1, function (MenuItem $primarySidebar) { if (!is_null($primarySidebar->getChild('Service Details Overview'))) { $service = Menu::context('service'); if ($service->domainStatus==="Active"){ $primarySidebar->getChild('Service Details Overview')->addChild('PortForward', array( 'label' => 'Port Forwarding', 'uri' => '/clientarea.php?action=productdetails&id=' . $_GET['id'] . '#tabPortForward', 'order' => '100' ))->setClass(( ! isset($_GET['modop']) ? 'active' : '')) ->setAttribute("dataToggleTab", "tabPortForward"); } } }); I'd like to have something like this: By default it's works only on hover. How can I make it works on active? I currently don't understand the 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.