nocontrols Posted July 10, 2016 Share Posted July 10, 2016 In the past, I have been able to add / remove menu items from NavBarLinks.php without any problem. But for last few days, anything I change in NavBarLinks.php is not having any effect and my navigation bar remains the same. I tried by opening webpages in different computers (assuming problem was with caching) but still no effect. As a simple test, if I just change: $navItem->setUri('web_hosting.php'); to $navItem->setUri('web_hosting2.php'); then the navigation bar link on my pages stays web_hosting.php Would appreciate if someone can share his / her experience or if there is a workaround. 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted July 10, 2016 Share Posted July 10, 2016 what is the content of NavBarLinks.php is? and what you are trying to do but not performed? 0 Quote Link to comment Share on other sites More sharing options...
nocontrols Posted July 10, 2016 Author Share Posted July 10, 2016 what is the content of NavBarLinks.php is? and what you are trying to do but not performed? NavBarLinks.php is the hook for Navigation bar links (Home, Hosting, Domains, Support etc). I think it comes standard with whmcs. Previously, I had made changes such as removing Contact Us from the menu bar or removing links to VPS Hosting / Dedicated Hosting (since I do not offer them). Right now I am trying to remove Home link by inserting the foll. code: if (!is_null($primaryNavbar->removeChild('Home'))) {} but its not having any effect! 0 Quote Link to comment Share on other sites More sharing options...
brian! Posted July 10, 2016 Share Posted July 10, 2016 NavBarLinks.php is the hook for Navigation bar links (Home, Hosting, Domains, Support etc). I think it comes standard with whmcs. it's not ringing any bells with me (nor Google) as being standard to WHMCS - it must be a custom hook from somewhere... it will definitely be useful to see the code within NavBarLinks.php 0 Quote Link to comment Share on other sites More sharing options...
nocontrols Posted July 10, 2016 Author Share Posted July 10, 2016 (edited) it's not ringing any bells with me (nor Google) as being standard to WHMCS - it must be a custom hook from somewhere... it will definitely be useful to see the code within NavBarLinks.php The problem was I had archived versions of NavBarLinks.php (such as NavBarLinks_July012016.php) in the hooks folder. Once I removed all the archived versions from the hooks folder, my changes start to get reflected. - - - Updated - - - The problem was I had archived versions of NavBarLinks.php (such as NavBarLinks_July012016.php) in the hooks folder. Once I removed all the archived versions from the hooks folder, my changes start to get reflected. Edited July 11, 2016 by nocontrols 0 Quote Link to comment Share on other sites More sharing options...
sentq Posted July 11, 2016 Share Posted July 11, 2016 to "archive" these files you need to change their extension name like: NavBarLinks_July012016.php => NavBarLinks_July012016.phpbackup for example, this way they will not make any changes in your installation 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.