I would like to get the current template file / line from a plugin function in smarty for profiling/debugging purposes.
Is it possible to do by using the passed $smarty object ?
something like this
function __smarty_add_javascript($params, $smarty){
Profiler::console('Add javascript @[FILE]#[LINE]');
Controller_Template_Base::getInstance()->javascripts[] = array_pop($params);
}
I am able to access the filename by using $smarty->source->filepath
however i couldnt find any line information.