Skip to content
Last updated

Development Guides Tools >> Guide to cPanel Interface Customization and Branding

Guide to cPanel Interface Customization - Content Includes

Introduction

Content includes add custom content to the header or footer of the cPanel interface. You can create global content includes and application content includes that display on all of cPanel's interfaces. Content include files can contain HTML and Template Toolkit filenames. For more information, read our Guide to Template Toolkit documentation.

Directories

To add content includes to the cPanel interface, add the files to the following directory:

/var/cpanel/customizations/content_includes

This directory does not exist by default. If it does not exist, create it.

Only users with root-level privileges can add content include files to the /var/cpanel/customizations/content_includes/ directory.

Template Toolkit filenames

Note:

cPanel's File Manager interface (cPanel >> Home >> Files >> File Manager) does not display global or individual includes.

Global content includes

Global content includes appear on every page in the cPanel interface. They override the header, footer, or styles and javascript in the <HEAD> element of every cPanel interface.

To add a global content include, refer to this table:

NameFilenameDescription
Global headcpanel_jupiter_head.html.ttThis file is included at the end of the <head> element of the html page. Use this file to add any styles or javascript overrides.
Global headercpanel_jupiter_header.html.ttThis file appears immediately below the main cPanel navigation bar at the top of the interface. This content include follows the same behavior as the navigation bar and remains at the top of the page even when scrolling.
After global headercpanel_jupiter_header_after.html.ttThis file appears immediately above the page title or heading.
Global footercpanel_jupiter_footer.html.ttThis file appears immediately above the cPanel footer links.
After Global footercpanel_jupiter_footer_after.html.ttThis file appears immediately below cPanel footer links.

Application content includes

Application content includes only appear on the interface specified in the filename.

  • You must specify in which application you want your content include to appear.
  • For a complete list of appkey values for cPanel's interfaces, refer to our Guide to cPanel Interface Customization - Appkeys documentation.
  • In the table below, <appkey> has been replaced with the appkey name.
NameFilenameDescriptionExample
Application headercpanel_jupiter_<app_key>_header.html.ttThis file appears immediately below the global header include. This content include follows the same behavior as the navigation bar and remains at the top of the page even when scrolling.cpanel_jupiter_domains_header.html.tt
After application headercpanel_jupiter_<app_key>_header_after.html.ttThis file appears between the global header after include and the page title.cpanel_jupiter_mod_security_header_after.html.tt
Application footercpanel_jupiter_<app_key>_footer.html.ttThis file appears immediately above the global footer include.cpanel_jupiter_email_accounts_footer.html.tt

Example

For example, to add a message to the header of cPanel's API Shell interface (cPanel >> Home >> Software >> API Shell), perform the following steps:

  1. Use SSH to log in to the server as a user root-level privileges.

  2. Navigate to the /var/cpanel/customizations/content_includes/ directory. This directory does not exist by default. Use the mkdir command to create this directory if it does not already exist on the server.

  3. Use your preferred text editor to create the cpanel_jupiter_api_shell_header.html.tt file and add the following contents:

    <div class="message">
       This message only appears in the API Shell interface!
    </div>
    <br/>

Tools page includes

cPanel's Tools interface uses two additional includes in the right sidebar.

NameFilenameDescription
Before Tools general informationcpanel_jupiter_tools_general_information_before.html.ttThis file appears immediately above the General Information panel on the right side of the Tools page.
Before Tools statisticscpanel_jupiter_tools_stats_before.html.ttThis file appears immediately above the Statistics panel on the right side of the Tools page.