magic "smarty" variable
| From: | Hans-Peter Oeri | Date: | Fri, 05 Oct 2001 17:01:19 +0000 |
| Subject: | magic "smarty" variable | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-1615@lists.php.net to get a copy of this message | ||
Hi!
Another suggestion: As I see, the values of the variable "smarty" are all
assigned. But by the laws of statistics, we usually only need very few of them.
This might not be a problem with the current range of values, but I'm missing a
$smarty.global.abc and some other values...
Why not handle the smarty var differently - not assigning values, but compiling
the call into a direct reference and therefore leaving out the assignment step:
old: $smarty.now -> $this->_tpl_vars['smarty']['now']
new: $smarty.now -> time()
Like that, one could introduce $smarty.global and whatever one likes.
For best comfort(tm) we could even have those translations in a definable array.
As usual, I will provide a patch, if I don't get beaten for my suggestion ;-)
Don't conform!
IkKampfCaspar75