Client Area Template Files
WHMCS is fully customisable. Every page of the client area is templated to allow you to change the look and feel of all aspects of the system. In WHMCS we use the powerful Smarty template system which allows you to:
- Customise the layout and content of the client area
- Add your own HTML & PHP code to enhance and extend
- Customise text strings within the lanuage files
A page is made up of three templates that are combined in this order:
header.tpl
The Page Template
footer.tpl
Header and Footer are displayed on every page. Within the template folder you will see numerous template files, these take the place of 'The Page Template' above. These templates define what is displayed on each page and are named so that you can easily identify which template relates to which page. So for example the template that defines the WHMCS homepage at (yoursite.com/whmcs/) is homepage.tpl, the client area page is clientarea.tpl and so on.
Basic Steps
- Duplicate the "default" folder in the templates folder and rename it to a custom name
- You can then make your changes to the template files as required - header.tpl and footer.tpl affect the header and footer of all pages - all other template files are for their respective pages
- Once complete, upload your new templates folder to the templates directory of WHMCS on your server
- Finally, to activate the template, login to the admin area, go to Configuration > General Settings and on the first tab of the general settings choose your custom template name from the Template dropdown menu.
Whichever template is selected here will is referred to throughout the documentation as the active template folder. The same can be said of the order form template selected in Setup > General Settings > Ordering tab.
Templates can also be changed on the fly per-user via the URL. Add ?systpl=templatename to the url when accessing the client area, or ?carttpl=orderform to change the order form displayed.
eg. http://demo.whmcs.com/clientarea.php?systpl=portal & http://demo.whmcs.com/cart.php?systpl=default&carttpl=boxes
See also Template Syntax