Re: [SMARTY-DEV] knowing your template
| From: | messju mohr | Date: | Tue, 13 Dec 2005 09:40:43 +0000 |
| Subject: | Re: [SMARTY-DEV] knowing your template | ||
| References: | 1 2 3 4 | Groups: | php.smarty.dev |
| Request: | Send a blank email to php-smarty-dev+get-2816@lists.php.net to get a copy of this message | ||
On Tue, Dec 13, 2005 at 08:55:36AM +0100, pobox@verysmall.org wrote:
> 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
$smarty.template is always available explicitly, it's just not
available to php land implicitly. what's your problem.
(search the archives, we already had this discussion at smarty-dev)
> I could see a good use of it for debugging and other purposes.
>
> Iv