Includes allow you to standardize the appearance of Template Toolkit files.
You can use the include function to include template files in other template files. This allows you to standardize the content of a set of files with similar headers, footers, or other features.
For example, you could create a standard footer file to include in all of your files. To do this, create the footer.html file, and then add the following code to the other files:
[% PROCESS 'footer.html' -%]
Each file now displays the footer.html file within the template.
The file path for an include is relative to the directory of the file that calls the included file. If you wish to organize your includes into the include subdirectory, call the include with the following code:
[% PROCESS 'includes/footer.html' -%]
Each file now displays the includes/footer.html file within the template.
About Template Toolkit
Template Toolkit is a collection of Perl modules that create a template system for dynamic webpages.
cPanel & WHM uses Template Toolkit to generate many parts of the user interface.
cPanel, WebHost Manager, and WHM are registered trademarks of cPanel, L.L.C. for providing its computer software that facilitates the management and configuration of Internet web servers. ®2020 All rights reserved.