Jump to content

Include dans template - Front controller


Recommended Posts

Bonjour,

Je viens de créer le front controller suivant :

class MonModuleMonControllerModuleFrontController extends ModuleFrontController{
    public function initContent(){
        parent::initContent();
        $this->setTemplate('module:mondmodule/views/templates/front/myfile.tpl');
    }
}

Dans le myfile.tpl, je souhaite inclure un formulaire form.tpl : 

{extends file='customer/page.tpl'}

{block name='page_title'}
  Mon titre
{/block}

{block name='page_content'}
   {include file="form.tpl"} 
{/block}

 

Mais cela génère l'erreur suivante : 

UndefinedFunctionException in smarty_internal_templatebase.php(157) : eval()'d code line 209:Attempted to call function "content_59f323c6e3c5f7_25694380" from the global namespace.

 

Quelqu'un peut-il m'aiguiller sur la façon d'inclure un fichier dans ce template ? Je ne comprends pas vraiment cette erreur.

 

Merci d'avance ;)

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...