Development Guides Home >> Guide to cPanel Interface Customization and Branding >> Guide to cPanel Interface Customization - Style Development

Guide to cPanel Interface Customization - Customize Feature Groups

Introduction

Note:

Custom styles are only available in the Paper Lantern theme. The Paper Lantern theme is now deprecated and will be removed. For more information, read our cPanel Deprecation Plan documentation.


You can customize the order and expand/collapse state of the cPanel interface's feature groups for new accounts.

Reorder the feature groups

To customize the default order of feature groups for users in the cPanel interface, perform the following steps:

  1. Log in to the server as the root user.
  2. Create the /root/cpanel3-skel/.cpanel/nvdata skeleton directory if it does not exist.
  3. In the /root/cpanel3-skel/.cpanel/nvdata directory, create the xmaingroupsorder file.
  4. In the xmaingroupsorder file, enter a pipe-separated list of feature group names. For example:
    Copy
    Copied
    databases|email|domains|files|metrics|security|software|advanced|preferences|applications

After you make this change, all new cPanel accounts you create will use this group order.

Collapse specific feature groups by default

To customize a specific list of feature groups to collapse by default in the cPanel interface, perform the following steps:

  1. Log in to the server as the root user.
  2. Create the /root/cpanel3-skel/.cpanel/nvdata skeleton directory if it does not exist.
  3. In the /root/cpanel3-skel/.cpanel/nvdata directory, create the xmainrollstatus file.
  4. In the xmainrollstatus file, enter a pipe-separated list of the group names and a Boolean false value (0) for each feature group. For example, to collapse only the Databases , Domains , Email , and Metrics feature groups by default, you would use the following format:
    Copy
    Copied
    |databases=0|domains=0|email=0|metrics=0

The list of feature groups must begin with a pipe character.

After you make this change, all new cPanel accounts you create will collapse the specified feature groups by default.

Apply your changes to existing users

You must run the following commands as the root user, or use the sudo su - command for the user that you want to run the command for. If you use the sudo su - command, you must remove the --user parameter from the command.

To apply your customizations to existing users, use the Personalization::set function.

Reorder the feature groups

To apply your customizations to existing users, run the following command, where username is the account's name:

Copy
Copied
echo '{"personalization": {"xmaingroupsorder":"databases|email|domains|files|metrics|security|software|advanced|preferences|applications"}}' | uapi --user=username --input=json --output=json Personalization set

The API response will resemble the following:

Copy
Copied
{
    "apiversion": 3,
    "module": "Personalization",
    "func": "set",
    "result": {
        "warnings": null,
        "errors": null,
        "data": {
            "personalization": {
                "xmaingroupsorder": {
                    "value": "databases|email|domains|files|metrics|security|software|advanced|preferences|applications",
                    "success": 1,
                    "reason": "OK"
                }
            }
        },
        "metadata": {},
        "status": 1,
        "messages": null
    }
}

Collapse specific feature groups by default

To collapse specific feature groups for an existing user, run the following command, where username is account's name:

Copy
Copied
echo '{"personalization": {"xmainrollstatus":"|databases=0|domains=0|email=0|metrics=0"}}' | uapi --user=username --input=json --output=json Personalization set

The API response will resemble the following:

Copy
Copied
{
    "apiversion": 3,
    "module": "Personalization",
    "func": "set",
    "result": {
        "warnings": null,
        "data": {
            "personalization": {
                "xmainrollstatus": {
                    "reason": "OK",
                    "value": "|databases=0|domains=0|email=0|metrics=0",
                    "success": 1
                }
            }
        },
        "metadata": {},
        "errors": null,
        "messages": null,
        "status": 1
    }
}