This tutorial uses Template Toolkit to create a new WHM interface. The examples below use WHM's master template, which creates new interfaces that integrate seamlessly with the look and feel of the main WHM interface.
This tutorial requires cPanel & WHM version 64 or later. Earlier versions of cPanel & WHM are not compatible with this tutorial.
To begin, create a new Template Toolkit file. Generally, this file uses the
.tmpl file extension.
USEdirective to load the
By default, cPanel & WHM displays interfaces correctly for left-to-right locales.
If your plugin will support multiple locales, we strongly recommend that you configure the interface to correctly display right-to-left and left-to-right locales.
Use Template Toolkit's
WRAPPER directive to apply WHM's master template, title, and theme to the template file.
WRAPPERdirective to set WHM's master template file.
headervalue to set the name at the top of the interface.
You can use additional flags to customize the way in which you include the master template, or the individual header and footer files. For more information and a full list of flags, read our Guide to WHM Plugins - Interfaces documentation.
Add stylesheets to customize the appearance of your interface.
SETdirective to set the list of stylesheets.
rtl_bootstrapstylesheet, which you set in Step 2.
/libraries/fontawesome/css/font-awesome.min.cssstylesheet, which allows your interface to load Font Awesome icons.
Enter the CSS files' paths relative to the
Add the contents of your plugin's interfaces. These contents may use any combination of Template Toolkit and other web languages.