Jump to content

Anything I change in NavBarLinks.php not having an effect


Recommended Posts

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.

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 :)

Link to comment
Share on other sites

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 by nocontrols
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated