Jump to content

Change the directions of the nav menu


hostxls

Recommended Posts

Hello,

 

I want to change the directions of the menu's in the nav of the client area.

For instant, if I want to change the directions of the Home in the client area, where do I do that?

 

I have read some of the documentation but it was hard for me to understand. Is there a easier way to guide me to the correct file where I can make the changes.

 

https://hostxls.com/clients/

 

Screenshot_4.png

Thank you in advance.

 

Vincent

Link to comment
Share on other sites

  • WHMCS Support Manager

Hi,

 

To remove the nav bar entirely, you'd edit the /templates/*your active template*/header.tpl file.

 

To customise the content of the nav bar in the new Six template, create a php file and upload it to the /includes/hooks directory. The necessary code to use is provided in the following documentation:

 

http://docs.whmcs.com/Client_Area_Navigation_Menus_Cheatsheet

http://docs.whmcs.com/Editing_Client_Area_Menus

 

For example to change where the "Home" link points you'd use the following code:

 

<?php

use WHMCS\View\Menu\Item as MenuItem;

add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)
{
   $navItem = $primaryNavbar->getChild('Home');
   if (is_null($navItem)) {
       return;
   }

   $navItem->setUri('https://www.example.com/homepage.php');

});

Link to comment
Share on other sites

Thank you for replying.

 

What I still don't understand and that is because I never work with it or heard the name "Hooks", i'm confused.

Later I will read about what hooks are but in the meantime, do I create a file called hooks or do I name the new file that I have created "hooks.php" and placed it the include file.

 

Sorry for asking, I'm in a learning mode and it's not that easy.

 

- - - Updated - - -

 

Thank you for replying.

 

What I still don't understand and that is because I never work with it or heard the name "Hooks", i'm confused.

Later I will read about what hooks are but in the meantime, do I create a file (map) called hooks or do I name the new file that I have created "hooks.php" and placed it the include file.

 

Sorry for asking, I'm in a learning mode and it's not that easy.

 

By the way, my name is Vincent

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • 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