Child pages
  • Guide to WHM dynamicui Files
Skip to end of metadata
Go to start of metadata

Introduction

Note:

We implemented the WHM dynamicui system in cPanel & WHM version 64. Older cPanel & WHM versions use the command2 method.

WHM themes use dynamicui files to display icons and groups. This system controls the items that appear in the WHM interface. The dynamicui file for WHM's default theme resides in the /usr/local/cpanel/whostmgr/docroot/themes/x/dynamicui.conf file.

The WHM dynamicui system only controls items in the WHM interface. The cPanel dynamicui system controls items in the cPanel interface.

Important:

To best match the WHM interface, include the provided headers and footers in your custom interfaces. For more information, read our Guide to WHM Plugins - Interfaces documentation and our experimental User Interface Style Guide.

The dynamicui files

The dynamicui files contain data that the system uses to generate groups of feature icons. The files store this data as hashes within a JSON-formatted file. Each hash requires the type parameter. This parameter determines if that hash describes a group, a feature's icon image, a subsection, or raw data. The type parameter defaults to image.

For example, the Tweak Settings icon resides in the Server Configuration group. It displays as a text link within that group in the WHM interface's side navigation menu. The dynamicui.conf file contains a group hash for the Server Configuration group, an image hash for the Tweak Settings feature, and could contain subitem hashes or raw hashes for associated content.

The dynamicui files contain the following hash types:

  • group — A group of features.
  • image — An individual WHM feature.
  • subitem — A subsection of an individual WHM feature.
  • raw — Raw data for template directives. 

Hash type parameters

Each hash type can contain additional parameters. For more information about each hash type's parameters, click the hash's tab.

A dynamicui file group hash contains the following parameters:

ParameterTypeDescriptionPossible ValuesExample
typestring

Required

The hash's type.

group

group
aclstring

Required

The group's Access Control Lists (ACLs).

  • Only WHM users who possess the specified ACLs can view or use the item.
  • System administrators can configure users' ACLs in WHM's Edit Reseller Nameservers and Privileges interface (WHM >> Home >> Resellers >> Edit Reseller Nameservers and Privileges).


  • ACL= and a comma-separated list of one or more valid ACLs, to restrict access to the group.

    Note:

    For a complete list of available ACLs, read our Guide to WHM Plugins - ACL Reference Chart documentation.

  • A blank value — Allow all WHM users access to the group.
ACL=all
dnsonly_okstring

Required

The group's status for cPanel DNSONLY™ servers.

  • dns — The group appears on cPanel DNSONLY servers.
  • A blank value — The group does not appear on cPanel DNSONLY servers.
dns
filestring

Required

The icon file to display for the group.

A valid .png or .svg image file, relative to the theme's icon directory.

Note:

Icons for any WHM plugins exist separately from the server's theme. For more information, read our Guide to WHM Plugins - Plugin Files documentation.

feature_name.png
groupstring

Required

The group name.

A valid string.

group_name
groupdescstring

Required

The group's display name.


A valid string.

Note:

You can localize this string to display it in the user's preferred language in the WHM interface. For more information, read our Guide to Locales documentation.

$LANG{'Group Name'}
grouporderinteger

Required

The group's display order in the WHM interface.

A positive integer that indicates the group's display order in the WHM interface.

Note:

Lower values appear at the top of the interface.

1
imgtypestring

The group or feature's image type.

icon is the only possible value.icon
searchtextstring

A list of the group's search terms.

A space-separated list of strings.search keywords
subtypestring

The icon type to use.

img is the only possible value.img
targetstring

The area of the interface in which the feature appears.

A valid HTML <a> target attribute.

_blank
keystring

A key to uniquely identify WHM interfaces and their associated assets for the cPanel Analytics program.

Note:

We added this parameter in cPanel & WHM version 76.

A valid string.

Generally, this value matches the file parameter's value without the file's extension.

feature_name

A dynamicui file image hash contains the following parameters:

ParameterTypeDescriptionPossible ValuesExample
typestring

Required

The hash's type.

image

image
aclstring

Required

The group, feature, or subitem's ACLs.

  • Only WHM users who possess the specified ACLs can view or use the item.
  • System administrators can configure users' ACLs in WHM's Edit Reseller Nameservers and Privileges interface (WHM >> Home >> Resellers >> Edit Reseller Nameservers and Privileges).
  • ACL= and a comma-separated list of one or more valid ACLs, to restrict access to the feature.

    Note:

    For a complete list of available ACLs, read our Guide to WHM Plugins - ACL Reference Chart documentation.

  • A blank value — Allow all WHM users access to the feature.
ACL=all
descriptionstring

Required

The feature's description that displays when the feature appears on the WHM Home interface.

Note:

We added this parameter in cPanel & WHM version 76.

A valid string.

Note:

You can localize this string to display it in the user's preferred language in the WHM interface. For more information, read our Guide to Locales documentation.

 Click to view ...
View and manage reseller accounts on your server. Resellers manage other [asis,cPanel] accounts and can access [asis,cPanel].
dnsonly_okstring

Required

The feature's status for cPanel DNSONLY servers.

  • dns — The feature appears on cPanel DNSONLY servers.
  • A blank value — The feature does not appear on cPanel DNSONLY servers.
dns
filestring

Required

The icon file to display for the feature.

A .png or .svg image file, relative to the theme's icon directory.

Note:

Icons for any WHM plugins exist separately from the server's theme. For more information, read our Guide to WHM Plugins - Plugin Files documentation.

feature_name.png
groupstring

Required

The group in which the item appears.

The group value from an existing group hash.

group_name
imgtypestring

The feature's image type.

icon is the only possible value.icon
itemdescstring

The feature's display name.

  • A valid string.

    Note:

    You can localize this string to display it in the user's preferred language in the WHM interface. For more information, read our Guide to Locales documentation.

  • A valid Template Toolkit directive.
$LANG{'Feature Name'}
itemorderinteger

Required

The feature's display order within its group.

A positive integer that indicates the order in which the feature appears in its group.

Note:

Lower values appear earlier in the group.

1
minimum_accounts_neededintegerThe minimum number of accounts required to display the feature icon.A positive integer.2
multiuser_requiredBoolean

Whether the server allows for the creation of more than a single user.

Note:

  • You cannot use this parameter on servers with a cPanel Solo License.
  • We added this parameter in cPanel & WHM version 66.
  • 1 — Display the feature icon.
  • 0 — Do not display the feature icon.
1
rolestring or hash

Required

The feature's server role.

Warning:

The server creates this parameter automatically. Do not edit this parameter's value. We do not support customizations to this parameter.

Note:

  • The icon only appears in the interface if the server configuration uses this role.
  • For more information about roles and server configurations, read our How to Use Server Profiles documentation.
  • We added this parameter in cPanel & WHM version 76.
  • A JSON hash that contains the match parameter and the roles array.
{ 
        "match" : "any" , 
        "roles" : [ 
            "MailSend" , 
            "MailLocal" 
        ] 
    } , 


match

string

Whether to require all roles in the roles parameter to match the server's roles.

Note:

We added this parameter in cPanel & WHM version 76.

The role hash contains this parameter.

  • any — Require the server to match any role in the roles parameter to display the feature. (OR condition)
  • all — Require the server to match all roles in the roles parameter to display the feature. (AND condition)
any

roles

array

An array of roles.

Note:

We added this parameter in cPanel & WHM version 76.

The role hash contains this parameter.

An array that contains one or more roles.

"MailSend" "MailLocal"
searchtextstring

A list of search terms for the feature.

A space-separated list of strings.search keywords
servicestring or hash

Required

The cPanel Service Daemon that monitors the feature.

Warning:

The server creates this parameter automatically. Do not edit this parameter's value. We do not support customizations to this parameter.

Note:

  • This icon only appears on servers with the service enabled.
  • We added this parameter in cPanel & WHM version 76.
  • A valid cPanel Service Daemon.

    Note:

    For a complete list of service daemons, read our cPanel Service Daemons documentation.

  • A hash that contains the match parameter and services array.
mysql

match

string

Whether to require all services in the services parameter to match enabled services on the server.

The service hash contains this parameter.

  • any — Require the server to match any service in the services parameter to display the feature. (OR condition)
  • all — Require the server to match all services in the services parameter to display the feature. (AND condition)
any

services

string

An array of services.

The service hash contains this parameter.

An array that contains one or more service names."mysql" "ftp"
subtypestring

The icon type to use.

img is the only possible value.img
targetstring

The area of the interface in which the feature appears.

A valid HTML <a> target attribute.

_blank
urlstring

Required

The feature's interface location.

A valid path, relative to the /usr/local/cpanel/ directory./example_plugin/feature_name
keystring

A key to uniquely identify WHM interfaces and their associated assets for the cPanel Analytics program.

Note:

We added this parameter in cPanel & WHM version 76.

A valid string.

Generally, this value matches the file parameter's value without the file's extension.

feature_name

A dynamicui file subitem hash contains the following parameters:

ParameterTypeDescriptionPossible ValuesExample
typestring

Required

The hash's type.

subitem

subitem
aclstring

Required

The subitem's ACLs.

  • Only WHM users who possess the specified ACLs can view or use the item.
  • System administrators can configure users' ACLs in WHM's Edit Reseller Nameservers and Privileges interface (WHM >> Home >> Resellers >> Edit Reseller Nameservers and Privileges).
  • ACL= and a comma-separated list of one or more valid ACLs, to restrict access to the subitem.

    Note:

    For a complete list of available ACLs, read our Guide to WHM Plugins - ACL Reference Chart documentation.

  • A blank value — Allow all WHM users access to the subitem.
ACL=all
breadcrumbstring

Required

A subitem's parent feature's location.

The system uses this value to generate breadcrumbs at the top of each WHM interface.

The subitem's parent feature's url value.

/example_plugin/feature_name
dnsonly_okstring

Required

The subitem's status for cPanel DNSONLY servers.

  • dns — The subitem appears on cPanel DNSONLY servers.
  • A blank value — The subitem does not appear on cPanel DNSONLY servers.
dns
filestring

Required

The icon file to display for the subitem.

A valid .png or .svg image file, relative to the theme's icon directory.

Note:

Icons for any WHM plugins exist separately from the server's theme. For more information, read our Guide to WHM Plugins - Plugin Files documentation.

feature_name.png
groupstring

Required

The group in which the item appears.

The group value from an existing group hash.

group_name
itemdescstring

The subitem's display name.

A valid string.

Note:

You can localize this string to display it in the user's preferred language in the WHM interface. For more information, read our Guide to Locales documentation.

$LANG{'Feature Name'}
parentinteger

Required

The subitem's parent feature's display order in the WHM interface.

The subitem's parent feature's itemorder value.1
searchtextstring

A list of search terms for the subitem.

A space-separated list of strings.search keywords
targetstring

The area of the interface in which the subitem displays.

A valid HTML <a> target attribute.

_blank
urlstring

Required

The subitem's interface location.

A valid path, relative to the /usr/local/cpanel/ directory./example_plugin/feature_name
keystring

A key to uniquely identify WHM interfaces and their associated assets for the cPanel Analytics program.

Note:

We added this parameter in cPanel & WHM version 76.

A valid string.

Generally, this value matches the file parameter's value without the file's extension.

feature_name

A dynamicui file raw hash contains the following parameters:

ParameterTypeDescriptionPossible ValuesExample
typestring

Required

The hash's type.

raw — Raw data for template directives.

raw
itemdescstring

Required

The template directive.

A valid Template Toolkit directive.

[% PROCESS 'menu/plugins_list.tmpl' target='mainFrame' -%]

Hash examples

To view an example dynamicui file for each hash, select that hash's tab:

A dynamicui file group hash will resemble the following example:

   {
      "type" : "group",
      "acl" : "",
      "dnsonly_ok" : "dns",
      "file" : "group_icon.png",
      "group" : "group_name",
      "groupdesc" : "$LANG{'Group Name'}",
      "grouporder" : 1,
      "imgtype" : "icon",
      "searchtext" : "search keywords",
      "subtype" : "img",
      "target" : "mainFrame", 
      "key" : "group_name"
    }

A dynamicui file image hash will resemble the following example:

   {
      "type" : "image",
      "acl" : "ACL=all",
      "description" : "$LANG{'This is my interface. There are many like it, but this is mine.'}"
      "dnsonly_ok" : "",
      "file" : "feature_name.png",
      "group" : "group_name",
      "imgtype" : "icon",
      "itemorder" : 2,
      "key" : "feature_name",
      "itemdesc" : "$LANG{'Feature Name'}",
      "searchtext" : "search keywords",
      "subtype" : "img",
      "target" : "mainFrame",
      "url" : "/example_plugin/feature_name",
      "minimum_accounts_needed": 2,
      "multiuser_required": 1,     
      "role" : {  
          "match":"any",
          "roles":[  
             "MailSend",
             "MailLocal"
          ]
      },
      "service" : "mysql" 
   }

A dynamicui file subitem hash will resemble the following example:

   {
      "type" : "subitem",
      "acl" : "ACL=all",
      "breadcrumb" : "/example_plugin/feature_name",
      "dnsonly_ok" : "",
      "file" : "subitem_name.png",
      "group" : "group_name",
      "itemdesc" : "$LANG{'Subitem Name'}",
      "parent" : "2",
      "searchtext" : "search keywords",
      "key" : "subitem_name",
      "target" : "mainFrame",
      "url" : "/example_plugin/feature_name/sub_item" 
   }

A dynamicui file raw hash will resemble the following example:

   {
      "type" : "raw",
      "itemdesc" : "[% PROCESS 'menu/plugins_list.tmpl' target='mainFrame' -%]" }
  

API control

You can use WHM API 1's get_available_applications function to retrieve the contents of dynamicui files.

cPanel & WHM version 62 and earlier

In cPanel & WHM version 62 and earlier, the command2 file displayed items for WHM themes.

We removed the /usr/local/cpanel/whostmgr/docroot/themes/x/command2 file from WHM's default theme in cPanel & WHM version 64.