Config files and compiled templates
| From: | Bertrand DUNOGIER | Date: | Mon, 25 Nov 2002 21:38:20 +0000 |
| Subject: | Config files and compiled templates | ||
| Groups: | php.smarty.dev | ||
| Request: | Send a blank email to php-smarty-dev+get-349@lists.php.net to get a copy of this message | ||
Hello,
This question mainly targets Andrei and Monte, but others might be
interested as well.
I was wondering about something... I have browsed Smarty Source code
and several compiled templates, and it appears that the config files
and the config vars are parsed every time the page is parsed. Would it
be possible to trick this so that the config vars are written as full
text to the compiled template ?
I have by instance
alert('<?php echo
$this->_config[0]['vars']['loginform_error_login_empty']; ?>
And I'd like to get
alert('<loginform_error_login_empty_value_here>')
would it be technically possible ? Of course there are points that
would need to be clarified, a variable config file path being one of
them. But don't you think it would be a great speed increase if the
config file didn't have to be loaded everytime ?
Before i check, i was sure i read several times on the mailing list
that config_vars was written "as is" to the config file. But it
appears that they don't...
Bertrand