Create a Two-Column Panel

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. You can create panels that span a single column or create a panel that spans two columns while in Desktop Mode.

For more information, see Client Area Sidebars.

Create a Two-Column Panel

You may wish to create a two-column panel above the one-column panel layout, or convert an existing panel.

To do this, create the includes/hooks/fullWidthRegisterDomainPanel.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 causes the Register a New Domain panel to be a two-column panel.

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')->setExtra('colspan', true);
    }
});

Last modified: October 29, 2024