PS Version 1.7.5
In order to show a page in the front office with come content of my custom module, I have followed the tutorial here: https://devdocs.prestashop.com/1.7/modules/creation/displaying-content-in-front-office/ to create a ModuleFrontcontroller like so:
class mymoduledisplayModuleFrontController extends ModuleFrontController
{
public function initContent()
{
parent::initContent();
$this->setTemplate('module:mymodule/views/templates/front/display.tpl');
}
}
the corresponding .tpl file just has a line of "Welcome" in it.
In the tutorial above it says "With just a few lines, the end result is already much better, with the “Welcome” line neatly placed between header, footer and columns!", except that I don't get that to show up. Here is the resulting source of my page:
<!-- begin module:MyModule/views/templates/front/display.tpl --> <!-- begin [PATH TO WEBROOT REMOVED IN THIS EXAMPLE]/prestashop/modules/MyModule/views/templates/front/display.tpl --> Welcome to my shop! <!-- end [PATH TO WEBROOT REMOVED IN THIS EXAMPLE]/prestashop/modules/MyModule/views/templates/front/display.tpl --> <!-- module:MyModule/views/templates/front/display.tpl -->
Apparently it doesn't even add body tags.
If I add this to my .tpl file, I get a least header and footer, but leftColumn ist not being displayed either:
{extends file='page.tpl'} {block name="page_content"} <p>Welcome to my shop!</p> {/block}
Can anyone tell me what I am dong wrong? Or if indeed the tutorial is missing some info, what do I need to put into my display.tpl to get all shop columns?
Many thanks for your help!
P.