Warning: You are browsing the documentation for PrestaShop 1.7, which is outdated.
You might want to look at the current version, PrestaShop 8. Read the updated version of the documentation
There are several changes to templating in your module front controllers.
In order to display content properly in your ModuleFrontController
files, you need to change the way you link to your template file in your initContent
method:
- $this->setTemplate('views/templates/front/template.tpl');
+ $this->setTemplate('module:yourmodule/views/templates/front/template.tpl');
If you want your module to display an entire page with your own content, the basic structure of your .tpl
file looks like this:
{extends file='page.tpl'}
{block name='page_header_container'}
Title of the page
{/block}
{block name='page_content'}
Content of the page
{/block}
Template inheritance is powerful mechanism available from v1.7 of PrestaShop.
More informations about front office and templating are available here and here.