Re: Smarty config files
| From: | Andrei Zmievski | Date: | Wed, 23 May 2001 15:17:17 +0000 |
| Subject: | Re: Smarty config files | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-797@lists.php.net to get a copy of this message | ||
On Wed, 23 May 2001, Mike Krus wrote:
> This works fine except:
> - I have to do load the config file also in the templates which are
> included in the top most template:
> . Is the config file actually parsed every time it is loaded
> in templates or sub-templates?
No, it is parsed only once per request.
> . Is there a way to avoid this?
See above.
> . Can config data be passed to sub-templates without having
> to reload the config file every time?
It is already passed to subtemplates automatically.
> - I currently have all language strings in a single config
> file but it's getting quite huge. It would be better to have
> a file for each template or bunch of templates. So I would
> like to set a template var to $SITELANG and do:
> {config_load file="somecfgfile.$SITELANG.cfg"}
> but this does not seem to work. Any ideas on how I could
> get something like this to work?
It seemed to work for me when I tried it..
-Andrei
* I wish life had an UNDO function. *