Characteristics of a back-office theme

PrestaShop's administration area is completely customizable, as it uses the same template language as the front-office themes, Smarty.

Each employee can use a customized theme:

The theme's folders

A back-office theme share many characteristics with a front-office theme, but has obviously its own set too.

One of the main characteristics is that a back-office is tied to a front-office theme: the back-office files and folders are stored along those for the front-office.

The back-office theme is built using the following standard folders, within the main theme folder:

Note that there is no /js file: you should not fiddle with the back-office's JavaScript code. The JavaScript code used by the back-office are stored in the /js folder, under the root of PrestaShop's folder.

CSS and image files

The back-office theme uses only two CSS files:

Image files for the back-office theme should mostly by in PNG format. This makes it possible to use transparency in order to work with the background color setting.

Controllers' view file

The back-office controllers (AdminController* classes) use View files that are located in the /themes/name_of_the_theme/template/controllers/name_of_the_controller folder.
You can override the View of a back-office controller by using the /override/controllers/admin/templates/name_of_the_controller folder.

The modules which have back-office controllers (ModuleAdminController* classes) use View files that are located in the /modules/name_of_the_module/views/templates/admin/name_of_the_controller folder.
You can override the View of a module's back-office controller by using  the /admin/themes/name_of_the_theme/template folder.

While the name of the controller must use CamelCase naming convention, the matching view file must use lowercase letters and underscore signs for its name.

For instance: the RangerPrice controller's matching view file must be named range_price.

 

Helpers' view files

PrestaShop looks for View files in a specific order for each type of controller.

For a controller (AdminController), the order is thus:

For a module (configuration page), the order is thus:

For a module's controller (ModuleAdminController), the order is thus:

While the name of the controller must use CamelCase naming convention, the matching view file must use lowercase letters and underscore signs for its name.

For instance: the RangerPrice controller's matching view file must be named range_price.