Smarty: get the current physical file path

cartbeforehorse picture cartbeforehorse · Oct 2, 2013 · Viewed 7.8k times · Source

In Smarty, is there a way to retrieve the current physical path of the template file?

I'm looking for the Smarty equivalent of the PHP __FILE__ super-variable.

(I'm sure that this question must have been asked before, but I can't for the life of me find it. Or maybe there's a good reason it hasn't been asked!?)

Answer

pozs picture pozs · Oct 2, 2013

Have a look at the {$smarty} reserved variable.