smarty icon indicating copy to clipboard operation
smarty copied to clipboard

Get the template last modified timestamp in Smarty v5

Open JulianAtkins opened this issue 3 months ago • 0 comments

Hello,

In previous Smarty versions (3.x and 4.x) I could get the template last modified timestamp with:

$tpl = $smarty->createTemplate("mytemplate.tpl", $_action, null, $smarty, false);
echo $tpl->cached->timestamp;

Unfortunately, in Smarty v5, this variable is not accessible.

Is there a v5 way to get the timstamp? or should I just look at the mytemplate.tpl file directly?

Thank you.

JulianAtkins avatar Nov 11 '25 14:11 JulianAtkins