Jump to content

Dean Walker

Member
  • Posts

    3
  • Joined

  • Last visited

Everything posted by Dean Walker

  1. Hi Brian, Thanks for that, yes worked a treat! I have no idea why it had invalid characters! Again thanks for the help!
  2. Hi All, Here from the UK, Long time browser of the forums, Thought it was time to start doing my bit as well as maybe getting a few support issues solved as this community has some very knowledgeable people!
  3. Nice templates. Well Done. I may try them out one day 🙂
  4. Hi wondering if you can help me out, I tried following all of the above, I managed to get it working if logged in but for logged out users it would chuck them up with an oops page. I have done some debugging and put some code back in and no more errors but the hook is no longer changing the URL. can I pick your brains for a moment and take a look at the code I am using and point me in the right direction? All I am trying to achieve is to redirect the standard knowledge base article links in the menu / secondary menu etc to another URL Thanks <?php # Menu/Sidebar Link Changes Hook for CJF077 # Written by brian! use WHMCS\View\Menu\Item as MenuItem; add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar) { if (!is_null($primaryNavbar->getChild('Knowledgebase'))) { $primaryNavbar->getChild('Knowledgebase') ->setURI('https://google.com'); } if (is_null($primaryNavbar->getChild('Support'))) { return; } if (!is_null($primaryNavbar->getChild('Support')->getChild('Knowledgebase'))) { $primaryNavbar->getChild('Support') ->getChild('Knowledgebase') ->setURI('https://google.com'); } }); add_hook('ClientAreaSecondarySidebar', 1, function (MenuItem $secondarySidebar) { if (is_null($secondarySidebar->getChild('Support'))) { return; } if (!is_null($secondarySidebar->getChild('Support')->getChild('Knowledgebase'))) { $secondarySidebar->getChild('Support') ->getChild('Knowledgebase') ->setURI('https://google.com'); } });
×
×
  • 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