Jump to content

Edit History

Yohannn

Yohannn

Thank you for your reply.

I make some search with what you shared me and I do this :

In my class :

class myClass extends Module {
	myFunction(){
		$module = Module::getInstanceByName('nameOfModuleIWant');
    	return $module;
	}
}

In my hook :

hookDisplayMyHook(){
	$this->context->smarty->assign([
		'myVariable' => $this->myClass->myFunction(),
	]);
	return $this->display(_FILe_, 'myTemplate.tpl');
}

In my template :

{include file=tpl_Path_I_Want/tpl_File_I_Want.tpl' listing=$myVariable}

and this work fine.

Yohannn

Yohannn

Thank you for your reply.

I make some search with what you shared me and I saw this :

{include file=tpl_Path/tplFile.tpl' listing=$variable}

and this work fine.

×
×
  • Create New...