I know there are similar questions, but none of them can solve my problem.
I placed a FrontController.php file in /override/classes/controller/
It contains this code:
Class FrontController extends FrontControllerCore{
public function displayHeader(){
if(!self::$initialized) $this->init();
$this->context->smarty->assign('test_ok','okok');
return parent::displayHeader();
}
}//end FrontController
From my custom theme, in header.tpl I placed a test code like this
{$test_ok}
And get this:
Notice: Undefined index: test_ok in [...]/cache/smarty/compile/81/a3/76/81a3760f9c0cb8c9ff677a0e7b59d8962cdaaeda.file.header.tpl.php on line 147
Notice: Trying to get property of non-object in [...]/cache/smarty/compile/81/a3/76/81a3760f9c0cb8c9ff677a0e7b59d8962cdaaeda.file.header.tpl.php on line 147
I also tried to assign that smarty var directly in FrontControllerCore.php (only just to test) but got the same notice.
Any idea?