Jump to content

Change Home URL in Header to Client Area URL


xfini

Recommended Posts

I would like to make some simple changes in six theme.

 

I searched the solution, but without success, plz help me.

 

1 ) I need to change the HOME URL from menu.

 

i searched in "header.tpl, but found nothing..

 

2 ) change WHMCS Home to mysite.com/clientarea.php

 

 

thanks in advance

Link to comment
Share on other sites

Here is the file I use. Name the file anything.php ( includes/hooks )

 

<?php

 

#adding Menu Item to primaryNavbar

 

use WHMCS\View\Menu\Item as MenuItem;

 

add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)

{

 

/** Add "Welcome" to the menu item. **/

$primaryNavbar->addChild('Welcome')

->setUri('index.php')

->setOrder(5);

 

/** Rename the "Home" menu item. **/

$primaryNavbar->getChild('Home')

->setLabel('Account Overview')

->setUri('clientarea.php');

 

});

Edited by Amcom
Link to comment
Share on other sites

Upload a file to your WHMCS dir /includes/hooks folder name the file ( added Menu Item.php ) then edit it replacing the code with this code

 

<?php

 

#adding Menu Item to primaryNavbar

 

use WHMCS\View\Menu\Item as MenuItem;

 

add_hook('ClientAreaPrimaryNavbar', 1, function (MenuItem $primaryNavbar)

{

 

/** Add "Welcome" to the menu item. **/

$primaryNavbar->addChild('Welcome')

->setUri('index.php')

->setOrder(5);

 

/** Rename the "Home" menu item. **/

$primaryNavbar->getChild('Home')

->setLabel('Account Overview')

->setUri('clientarea.php');

 

});

 

 

I use the Welcome button to return to the home page. If you like register at my site to see the flow, I can always always delete your account after you see how I have it setup for my site. If you let me know what buttons you want and where they go I will try to put the code together for you. http://www.sprhost.com

Link to comment
Share on other sites

  • 4 years later...

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