Guide to Template Toolkit - Includes

Introduction

Includes allow you to standardize the appearance of Template Toolkit files.

Includes

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.

Note:

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 theinclude subdirectory, call the include with the following code:

[% PROCESS 'includes/footer.html' -%]

Each file now displays the includes/footer.html file within the template.

  • 0 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....