Guide to Template Toolkit in cPanel & WHM

Introduction

Template Toolkit is the main template system for the cPanel and WHM interfaces. This system uses the Template Toolkit Perl library to create templates that can, for example, perform calls to the cPanel APIs and UAPI.

Note:

  • Whenever you customize existing template files, we strongly recommend that you back up all of the files before you edit them. 

Access the Template Toolkit system

Use cptt tags to access the Template Toolkit system from HTML files. cptt tags reference a file that is relative to the /usr/local/cpanel/base/frontend/theme directory, where theme is the cPanel theme (x3 or paper_lantern).

For example, to call the /usr/local/cpanel/base/frontend/x3/templatefile.tmpl file from within an HTML file, use the following code in an x3 theme page:

<?cptt templatefile.tmpl ?> 

Note:

HTML files and the .tmpl files that they call must exist in the same directory.

 

  • 54 Users Found This Useful
Was this answer helpful?

Related Articles

The cPanel Interface

For  cPanel  &  WHM  version  58 Overview The cPanel interface is...

User Preferences

For cPanel & WHM version 58 Overview This document outlines how to access your cPanel...

Manage External Authentications

For cPanel & WHM version 58 Overview Manage credentials Additional documentation...

What is cPanelID?

In This Article:  Overview ServicesHow to get a cPanelID cPanelID External...

Guide to cPanel Interface Customization - cPanel Style Development

Introduction You can develop custom styles that modify the appearance of the cPanel interface....