okom3pom 682 Posted November 14, 2016 (edited) Bonjour, Tout est dans le titre quand je fais : $this->setTemplate('productfooter.tpl'); Il ne trouve pas le template qui va d'ailleurs chercher à la racine du dossier /theme/montheme/Si j'utilise : $this->setTemplate('module:okom_moreinfo/views/templates/front/productfooter.tpl'); Je n'ai pas de footer et de header. Ca fonctionnait très bien en RC2 :'(Est ce que j'ai loupé un truc là ? Merci d'avance Edited November 15, 2016 by okom3pom (see edit history) Share this post Link to post Share on other sites
okom3pom 682 Posted November 14, 2016 Il me manquait : {extends file='page.tpl'} Share this post Link to post Share on other sites
coeos.pro 609 Posted November 14, 2016 as tu essayé: $this->fetch('module:okom_moreinfo/views/templates/front/productfooter.tpl'); Share this post Link to post Share on other sites
okom3pom 682 Posted November 14, 2016 (edited) Dans un module : $this->fetch();Dans un controller $this->setTemplateIl me manquait dans mon tpl {extends file='page.tpl'} Merci @Atch Edited November 14, 2016 by okom3pom (see edit history) 1 Share this post Link to post Share on other sites
Knowband Plugins 140 Posted November 14, 2016 You can use the following code to render some file from the Root directory of PrestaShop:$this->setTemplate(_PS_ROOT_DIR_.'okom_moreinfo/views/templates/front/productfooter.tpl' Share this post Link to post Share on other sites
okom3pom 682 Posted November 15, 2016 (edited) @Knowband Plugins Thx for help but the only way i found for module controller is : $this->setTemplate('module:okom_moreinfo/views/templates/front/productfooter.tpl'); If i try : $this->setTemplate(_PS_ROOT_DIR_.'okom_moreinfo/views/templates/front/productfooter.tpl'); i have : /myroot/themes/mytheme/templates/myroot/okom_moreinfo/views/templates/front/productfooter.tpl Edited November 15, 2016 by okom3pom (see edit history) Share this post Link to post Share on other sites
abdess 1 Posted February 12, 2017 salut okom3pom j'ai eu le meme problem comment je peux le resoudre ?? merci d'avance Share this post Link to post Share on other sites
stornight 2 Posted May 29, 2017 salut okom3pom j'ai utiliser dans mon controler : $this->setTemplate('module:monModule/views/templates/front/display.tpl'); et j'ai mis dans mon fichier display.tpl : {extends file='display.tpl'} mais je n'ais qu'une chaîne de caractère sans le reste du site. Comment a tu résolus ce problème ? Share this post Link to post Share on other sites
okom3pom 682 Posted May 29, 2017 {extends file='page.tpl'} Et pas {extends file='display.tpl'} Share this post Link to post Share on other sites
stornight 2 Posted May 29, 2017 Ba ça marche pas non pu :'( j'ai ça dans mon tpl : {extends file='page.tpl'} Aloa !!! Share this post Link to post Share on other sites
abdess 1 Posted May 29, 2017 Ba ça marche pas non pu :'( j'ai ça dans mon tpl : {extends file='page.tpl'} Aloa !!! tu as vidé la cache ? Share this post Link to post Share on other sites
stornight 2 Posted May 29, 2017 effectivement la ça marche j'ai la structure de mon site par contre j'ai pu de texte Share this post Link to post Share on other sites
AAymeric 6 Posted July 7, 2017 Bonjour stornight, Je réponds un peu tard mais voici un exemple du fichier .tpl qui affiche la structure du site et quelque chose dedans. {extends file='page.tpl'} {block name='page_content'} <h1>Test</h1> {/block} Je t'invite à consulter le fichier page.tpl du thème pour voir lequel block t'intéresse. 2 Share this post Link to post Share on other sites
PP2607 9 Posted July 19, 2017 {extends file='page.tpl'} {block name='page_content'} <h1>Test</h1> {/block} Un gran dmerci AAymeric pour moi ça marche nickel. C'est la seule façon qui me permette de faire marcher un nouveau module Presta 1.7 (http://doc.prestashop.com/display/PS16/Displaying+content+on+the+front+office) Dans cet url tout ça n'était pas clair. Share this post Link to post Share on other sites
regatonseb 0 Posted May 14, 2019 On 7/7/2017 at 11:02 PM, AAymeric said: {extends file='page.tpl'} {block name='page_content'} <h1>Test</h1> {/block} Excellent, merci à tous pour cette aide ! Share this post Link to post Share on other sites