Re: [SMARTY] Re: Compile time

From: Date: Thu, 20 Feb 2003 23:45:33 +0000
Subject: Re: [SMARTY] Re: Compile time
References: 1 2 3 4  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-8068@lists.php.net to get a copy of this message
Would it be possible at all to include a Smarty variable in a later release that allows you to access the compile time of the template? Seems like everyone wants to do this, might be nice to have a consistent way of doing it. Something like "{SmartyCompileTime}", which would return in date (so you could format it as you pleased) format the exact (or as close as you can get) time it took from the beginning of compiling the template to the end. Just a thought. Tom Sommer wrote:
On Fri, 21 Feb 2003 00:17:32 +0100, Messju Mohr wrote:
the intention of a compiler-function is to emit php-code into the compiled template. i don't think it is so pretty useless to be able to tell *where* in the template the return-value of the compiler-function should be inserted. :)
maybe you can write a pre-filter that prepends the {runCompileFunction} in front of every template before it gets compiled?
Hmm, well.... hmmm... hm... I guess what I want is something called run_function_on_compile :) or something I just need to set two vars at the end of each compile but maybe I'll have to settle with inserting this useless line on the template :) Thanks anyway


« previous php.smarty.general (#8068) next »