Re: [SMARTY] How to get the name of a compiled template?
| From: | Jordi Canals | Date: | Thu, 18 Nov 2004 11:04:30 +0000 |
| Subject: | Re: [SMARTY] How to get the name of a compiled template? | ||
| References: | 1 2 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11977@lists.php.net to get a copy of this message | ||
On Wed, 17 Nov 2004 21:05:20 -0800 (PST), boots <jayboots@yahoo.com> wrote:
> --- Jordi Canals <jcanals@gmail.com> wrote:
> > ...
> > So, I need some method to retrieve the compiled name for the
> > template, taking into consideration the $smarty->compile_id property
> > did not found it in the manual.
> >
> > Calling
> >
> > _get_auto_filename($this->compile_dir, $resource_name,
> > $this->compile_id) . '.php';
> >
> > returns the name I want, but because it is a private function cannot
> > be sure it will work in future releases.
>
> I don't know of another way, so if it works for you then you might want
> to wrap the _get_auto_filename() method with a method in an extended
> Smarty class and then call your custom method where you need that
> functionality. That way if the private function changes you only have
> to alter your application in one place.
>
Boots,
Many thanks. That's what I'm doing now as the best solution found.
Regards,
Jordi.