Developer's Guide
basic line, and call that file from mymodule_page.php, which will add the
theme's header, footer, etc.
You should strive to use explicit and recognizable names for your TPL
files, so that you can find them quickly in the back-office – which is a
must when using the translation tool.
mymodule_page.tpl
Welcome to my shop!
mymodule_page.php
<?php
global $smarty;
include( '../../config/config.inc.php' );
include( '../../header.php' );
$smarty->display( dirname(__FILE__) . '/mymodule_page.tpl' );
include( '../../footer.php' );
?>
We first load the current Smarty instance. This must be done before any
call to the display() method.
The various include() calls in the file enable us to load:
The current PrestaShop configuration.
The theme's header file (through header.php, which acts as a load
file).
the theme's footer file (through footer.php, which acts as a load file).
In the middle of these, we place your custom template file, whose single
action will be to display the "Welcome to my shop!" line.
Save all files and reload your shop's homepage: with just a few lines, the
end result is so much better, with our "Welcome" line neatly placed
between header, footer and columns!