- Created by Unknown User (sarah), last modified by Unknown User (sarah.kiniry) on Jan 14, 2016
Package extensions add custom fields to packages and accounts. These fields can accept customized non-standard variables that you can use in your cPanel & WHM applications or scripts.
- WHM will only recognize the package extension if you save the default settings file and the template (
.tt2) file with identical filenames.
- For example, if
dogis the default settings file, then
dog.tt2must be the template file.
- For example, if
- Extension filenames cannot contain spaces.
- WHM users cannot add package extensions that are named
0from WHM's Add a Package interface (Home >> Packages >> Add a Package). Instead, they must use the WHM API to add that extension.
Create an extension
To create a basic package extension, perform the following steps:
- Create a default settings file. — The default settings file provides the default configuration for an extension's variables.
- Create a template file. — Package extensions use Template Toolkit (
.tt2) files to display variable forms in the WHM interface.
- Save these files to the
- Use the variables that the extension creates in your custom code.
WHM users can access package extensions in the following interfaces:
- Add and configure extensions to hosting plans (packages) in WHM's Add a Package interface (Home >> Packages >> Add a Package).
- Configure a hosting plan's extensions in WHM's Edit a Package interface (Home >> Packages >> Edit a Package).
- Configure the chosen hosting plan's extensions when you select options manually in WHM's Create a New Account interface (Home >> Account Functions >> Create a New Account) or WHM's Modify an Account interface (Home >> Account Functions >> Modify an Account).