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

Learn how to upgrade to the latest version.

Make PrestaShop 1.6 modules compatible with 1.7

Module front controllers

There are several changes to templating in your module front controllers.

Getting a proper template for a page

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');

Basic structure of a module front page template

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 name='page_content'}
Content of the page

Template inheritance is powerful mechanism available from v1.7 of PrestaShop.

More informations about front office and templating are available here and here.