Re: [SMARTY] How to get the name of a compiled template?
| From: | boots | Date: | Thu, 18 Nov 2004 05:05:20 +0000 |
| Subject: | Re: [SMARTY] How to get the name of a compiled template? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-11976@lists.php.net to get a copy of this message | ||
--- 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.
xo boots