Smarty: get the current physical file path
Asked Answered
P

1

5

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!?)

Prod answered 2/10, 2013 at 20:20 Comment(0)
L
11

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

Latrell answered 2/10, 2013 at 21:0 Comment(1)
Yes, {$smarty.current_dir} and {$smarty.template} are the variables I was looking for. Not sure why that was so difficult to find on the google searches. Thanks.Prod

© 2022 - 2024 — McMap. All rights reserved.