hmaddy Posted September 28, 2022 Share Posted September 28, 2022 Added New menu to whmcs clientarea and its working fine. But i am facing the issue, that when a customer clicks on it, its opens on same window. how can i set to open it on seperate window or tab, <?php #adding Menu Item to primaryNavbar use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { $primaryNavbar->addChild('Premium Support') ->setUri('My url') ->setOrder(70); }); 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted September 28, 2022 Share Posted September 28, 2022 Not sure if setAttribute still works, can't test right now but give this a go: <?php #adding Menu Item to primaryNavbar use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { $primaryNavbar->addChild('Premium Support') ->setUri('My url') ->setAttribute('target', '_blank') ->setOrder(70); }); 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted September 28, 2022 Share Posted September 28, 2022 Try this! ->setAttribute("target", '_blank') 0 Quote Link to comment Share on other sites More sharing options...
hmaddy Posted September 28, 2022 Author Share Posted September 28, 2022 Thanks to all!! its works with ->setAttribute('target', '_blank') 0 Quote Link to comment Share on other sites More sharing options...
hmaddy Posted September 28, 2022 Author Share Posted September 28, 2022 One more doubt. How add a social media icon to the menu 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted September 28, 2022 Share Posted September 28, 2022 ->setIcon('fa-brands fa-facebook') 0 Quote Link to comment Share on other sites More sharing options...
hmaddy Posted September 28, 2022 Author Share Posted September 28, 2022 22 minutes ago, web2008 said: ->setIcon('fa-brands fa-facebook') Added, But its not working 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted September 28, 2022 Share Posted September 28, 2022 Try using fab fa-whatsapp 0 Quote Link to comment Share on other sites More sharing options...
web2008 Posted September 28, 2022 Share Posted September 28, 2022 "fa-brands fa-facebook" was just an example... 0 Quote Link to comment Share on other sites More sharing options...
hmaddy Posted September 28, 2022 Author Share Posted September 28, 2022 5 minutes ago, web2008 said: "fa-brands fa-facebook" was just an example... why its not showing in color. only black and white. 0 Quote Link to comment Share on other sites More sharing options...
yggdrasil Posted September 28, 2022 Share Posted September 28, 2022 (edited) 16 minutes ago, hmaddy said: why its not showing in color. only black and white. You can change colors with CSS rules. Edited September 28, 2022 by yggdrasil 0 Quote Link to comment Share on other sites More sharing options...
leemahoney3 Posted September 29, 2022 Share Posted September 29, 2022 (edited) Can change the color using: #nav .fa-whatsapp { color: green !important; } Edited September 29, 2022 by leemahoney3 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.