Jump to content

Prestashop 1.7 don't see my template file in module


Recommended Posts

Hello, 

 

I have created a module named gestionfournisseur. I need to modify some part of frontend view in this module. For this, I had created two file:

1 - gestionfournisseur/controllers/front/display.phpthis file content my controller logic and herit ModuleFrontController

<?php
class gestionfournisseurdisplayModuleFrontController extends ModuleFrontController
{
  public function initContent()
  {
    parent::initContent();
    $this->setTemplate('display.tpl');
  }
}

2 - gestionfournisseur/views/templates/front/display.tpl: content the view I want to display.

Hello World!!

I generated the link to this page with the following instruction in my module main file:

$this->name = 'gestionfournisseur';
$this->context->link->getModuleLink($this->name,'display')

But, prestashop return me a big exception: No template found for display.tpl

 

If it can't help you, the content of my variable $this->context->smarty->getTemplateDir() look like this:

array:1 [▼
  0 => "/my_hosts/manishop/themes/classic/templates/"
]

Please can't you tell me what is the problems?

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...