$config_load in included tpl's
| From: | Thomas Pilgaard Nielsen | Date: | Mon, 14 Oct 2002 07:03:25 +0000 |
| Subject: | $config_load in included tpl's | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-6125@lists.php.net to get a copy of this message | ||
HI,
I'm attempting to load a config file into a main template, which holds 'superglobals' that apply to all templates. Further, I'm attempting at the same time to load a config file into an included template, holding constants that are context sensitive.
The problem is this: Even though I declare the scope of both of the config files global I cannot seem to use the ones that are included in the child template in the main template. The other way around seems to work fine: constants declared in the main template config are visible to the child template.
The odd thing is that both config files shos up in the debugger as being loaded and are furthermore shows under assigned config file variables / outter template scope.
One last thing - I've tried to load a specific section of a config-file using a variable ({config_load file=main.conf section=$var}) but didn't manage to get it working. Can anyone clarify if I've been a doofus?
Any help will be greatly appreciated.
Thanks in advance,
Thomas Pilgaard