Page tree
Skip to end of metadata
Go to start of metadata

 

Introduction

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

Notes:

  • We implemented the WHM dynamicui system in cPanel & WHM version 64.
    • Older versions of WHM cannot use this system.
    • 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.
      • WHM themes in cPanel & WHM version 64 and later must include a dynamicui.conf file.
  • The WHM dynamicui system only controls items in the WHM interface. The cPanel dynamicui system controls items in the cPanel interface separately.
  • On servers that run cPanel Solo or cPanel DNSONLY, this file's contents may vary.

The dynamicui file

The dynamicui files contain data that the system uses to generate groups of feature icons. It stores this data as hashes within a JSON-formatted file. The parameters that each hash contains determine the type of data that the hash describes:

  • group hashes contain subsections of the WHM Home interface that display sets of individual features. 
  • image hashes contain the settings to display each WHM feature within its group.
  • subitem hashes contain subsections of individual WHM features.
  • raw hashes contain data for template directives.

For example, the Tweak Settings icon exists within the Server Configuration group, and 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.

Parameters

The hashes within the dynamicui.conf file may contain the following parameters:

ParameterTypeDescriptionPossible ValuesExample
typestring

The hash's type.

This parameter defaults to image.

  • group — A group of features. group hashes can include the following additional parameters:
    • acl
    • dnsonly_ok
    • file
    • group
    • groupdesc
    • grouporder
    • imgtype
    • searchtext
    • subtype
    • target
  • image — An individual WHM feature. image hashes can include the following additional parameters:
    • acl
    • dnsonly_ok
    • file
    • group
    • imgtype
    • itemdesc
    • itemorder
    • searchtext
    • subtype
    • target
    • url
  • subitem — A subsection of an individual WHM feature. subitem hashes can include the following additional parameters:
    • acl
    • breadcrumb
    • dnsonly_ok
    • file
    • group
    • itemdesc
    • parent
    • searchtext
    • target
    • type
    • url
  • raw — Raw data for template directives. raw hashes must include the itemdesc parameter.
group
aclstring

The required Access Control Lists (ACLs) for the group, feature, or subitem.

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

Add this parameter to group, image, and subitem hashes.

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

    Note:

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

  • A blank value, to allow all WHM users access to the item.
ACL=all
breadcrumbstring

The location of a subitem's parent feature. The system uses this value to generate breadcrumbs at the top of each WHM interface.

Add this parameter to subitem hashes.

The subitem's parent feature's url value.

/example_plugin/feature_name
dnsonly_okstring

The group, feature, or subitem's status for cPanel DNSONLY servers.

Add this parameter to group, image, and subitem hashes.

  • dns — The group, feature, or subitem displays on cPanel DNSONLY servers.
  • A blank value — The group, feature, or subitem does not display on cPanel DNSONLY servers.
dns
filestring

The icon file to display for the group, feature, or subitem.

Add this parameter to group , image , and subitem hashes.

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

The group name. For features and subitems, this is the group in which the item displays.

Add this parameter to group , image , and subitem hashes.

  • For group hashes, a valid string.
  • For image and subitem hashes, the group value from an existing group hash.
group_name
groupdescstring

The group's display name.

Add this parameter to group hashes.

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

The group's display order in the WHM interface.

Add this parameter to group hashes.

A positive integer that indicates the order in which the group displays in the WHM interface. Lower values display at the top of the interface.1
imgtypestring

The image type to use for the group or feature.

Add this parameter to group and image hashes.

icon is the only possible value.icon
itemdescstring

The feature's or subitem's display name, or the template directive for raw hashes.

Important:

raw hashes require this parameter.

Add this parameter to image, subitem, and raw hashes.

  • 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

The feature's display order within its group.

Add this parameter to image hashes.

A positive integer that indicates the order in which the feature displays in its group. Lower values display at the top of the group.1
parentinteger

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

Add this parameter to subitem hashes.

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

A list of search terms for the group, feature, or subitem.

Add this parameter to group, image, and subitem hashes.

A space-separated list of strings.search keywords
subtypestring

The icon type to use.

Add this parameter to group and image hashes.

img is the only possible value.img
targetstring

The area of the interface in which the group, feature, or subitem displays.

Add this parameter to group , image , and subitem hashes.

A valid HTML <a> target attribute.

_blank
urlstring

The location of the feature or subitem's interface.

Add this parameter to image and subitem hashes.

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

Examples

The dynamicui.conf file contains many hashes that resemble the following examples:

Groups

Group entries in the dynamicui.conf file appear similar to 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"
   },

Images

Image entries in the dynamicui.conf file appear similar to the following example: 

   {
      "type" : "image",
      "acl" : "ACL=all",
      "dnsonly_ok" : "",
      "file" : "feature_name.png",
      "group" : "group_name",
      "imgtype" : "icon",
      "itemorder" : 2,
      "itemdesc" : "$LANG{'Feature Name'}",
      "searchtext" : "search keywords",
      "subtype" : "img",
      "target" : "mainFrame",
      "url" : "/example_plugin/feature_name"
   },

Subitems

Subitem entries in the dynamicui.conf file appear similar to 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",
      "target" : "mainFrame",
      "url" : "/example_plugin/feature_name/sub_item"
   },

Raw

Raw entries in the dynamicui.conf file appear similar to the following example: 
   {                                                                                                                    
      "type" : "raw",                                                                                                   
      "itemdesc" : "[% PROCESS 'menu/plugins_list.tmpl' target='mainFrame' -%]"                                        
   },