Smarty config files

From: Date: Wed, 23 May 2001 15:12:40 +0000
Subject: Smarty config files
Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-796@lists.php.net to get a copy of this message
Hi, I have been using Smarty for a few weeks now and I am very pleased with it! However, I have a question regarding config files: I use a config file to hold language specific strings, so I assign a variable with name of config file which is appropriate for the user's settings and in the template do:
    {config_load file=$LANGFILE}
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?
. Is there a way to avoid this? . Can config data be passed to sub-templates without having
    to reload the config file every time?
- 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? Thanks, Mike

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