Rearrange Panels
The customizable panels in the Client Area Homepage display quick information to clients when they log in. You can customize this part of the Client Area to suit your brand and your customers’ needs, including rearranging panels in the Homepage display.
For more information, see Client Area Homepage Panels.
Rearranging Panels
You can change the order in which a panel appears within the Client Area.
Create the includes/hooks/rearrangeRegisterDomainPanel.php
file in your WHMCS installation using the example below. WHMCS will parse the file and hook when the page loads and will run the hook function when the client visits the homepage after logging in.
Example Code
<?php
// This hook will rearrange the Register a New Domain panel
// to be the first panel displayed in the Client Area
use WHMCS\View\Menu\Item;
add_hook('ClientAreaHomepagePanels', 1, function (Item $homePagePanels) {
if (!is_null($homePagePanels->getChild('Register a New Domain'))) {
$homePagePanels->getChild('Register a New Domain')
->setOrder(0);
}
});
Last modified: September 23, 2024