gabriel81mi Posted November 23, 2018 Share Posted November 23, 2018 Hello everybody I am write a module and I can not embed original template this is my code public function initContent() { parent::initContent(); $this->setTemplate('module:mymodule/views/templates/front/display.tpl'); } the display.tpl content is showing but not the template. I google it and try many different way, without any result In other module I used, without any problem, renderView instead initContent, but is admin controller. If I try to do the same in this plugin is return me a smarty Exception: Missing '$template' parameter I read this article: https://devdocs.prestashop.com/1.7/modules/creation/displaying-content-in-front-office/ and until 1.4 you must to use include Someone have a solution about white page? Thanks in advance Gabriele Link to comment Share on other sites More sharing options...
gabriel81mi Posted November 23, 2018 Author Share Posted November 23, 2018 (edited) Thank you ndiaga, that is work, but I don't see the view text is this correct? {extends file='page.tpl'} This is my view "This is my view" is now, not printed Edited November 23, 2018 by gabriel81mi (see edit history) Link to comment Share on other sites More sharing options...
gabriel81mi Posted November 23, 2018 Author Share Posted November 23, 2018 (edited) I've got it, must to write blocks {extends file='page.tpl'} {block name='page_content'} This is my view {/block} Thank you Edited November 23, 2018 by gabriel81mi (see edit history) Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now