Re: knowing your template

"[email protected]" <[email protected]> Tue, 13 Dec 2005 08:55:36 +0100
Newsgroups gmane.comp.php.smarty.devel
Message-ID <[email protected]>
messju mohr wrote:
> You can automate that very easy. write a prefilter that prepends
> '{assign var=current_template value=$smarty.template}' to each source.
> 
> you can access $smarty->get_template_vars('current_template') inside
> your plugins then. and smarty does the bookkeeping of nesting
> automagically since it restores the old value of $current_template
> when the template is left (you cannot change vars of including
> templates inside included template)

Doesn't it make sense to think (for 3.0 or so) of something like -

$smarty.template

I could see a good use of it for debugging and other purposes.

Iv

-- 
Smarty Development Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php