loading configs files
| From: | Michael Delorme | Date: | Wed, 22 Jan 2003 22:44:49 +0000 |
| Subject: | loading configs files | ||
| Groups: | php.smarty.general | ||
| Request: | Send a blank email to php-smarty-general+get-7301@lists.php.net to get a copy of this message | ||
Hi
How can tell Smarty to use a particular configs file ?
There is no problem when the files are in a 'configs' subdirectory of the
calling template ; but if I want to use the main config file of my site
located several directories away, how can I do ?
For example I have :
/rootdoc/configs/main.conf
/rootdoc/templates/main.tpl
/rootdoc/templates_c/...
/rootdoc/*.php
/rootdoc/module/moduleA/templates/moduleA.tpl
/rootdoc/module/moduleA/templates_c/...
/rootdoc/module/moduleA/*.php
-> How can I use 'main.conf' in 'moduleA.tpl' ?
I tried
{config_load file="file:d:/rootdoc/configs/main.conf"}
but it doesn't work (whereas it works for {include
file="file:d:/rootdoc/templates/main.tpl"})
In a mail dated 09 Dec 2002, M. Ohrt wrote "In CVS, I added a config_load()
so you can load config files from your apps just as you can from the
templates". So I got the latest CVS but it doesn't work. I'm surely missing
something.
Thanks in advance.
Michael