Jump to content

[SOLVED] CREATE NEW VARIABLE FOR header.tpl


Recommended Posts

I want to put in my header.tpl the date time:

 

so I try to put in FrontController.php public function displayHeader()

 

$date_time = (date("l, w F Y"));
self::$smarty->assign('date_time_tpl',$date_time );

 

then visual the date by put variable on header.tpl

 

{$date_time_tpl}

 

now works!!!

 

thanks to everybody, expecial rocky!!!

Link to comment
Share on other sites

  • 1 year later...
  • 3 months later...

It didn't work for me. does it work for vs 1.5.1.3 ? I've done everything above but when I debug the page I can not see the new variable. I also copy and paste the example 3 from prestashop user guide it didn't work too. force compile is active and cache is close. what is wrong here?

Edited by tebdilikiyafet (see edit history)
Link to comment
Share on other sites

×
×
  • Create New...