Re: [SMARTY] loading configs files
| From: | Monte Ohrt | Date: | Wed, 22 Jan 2003 22:57:11 +0000 |
| Subject: | Re: [SMARTY] loading configs files | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-7302@lists.php.net to get a copy of this message | ||
I think you have to establish the proper config_dir root, it will always
be relative to that. Or, make symlinks (shortcuts?) from one directory
to the other and keep the same config_dir. Or, move your config files
all under one global config_dir with subdirs for your modules.
On Wed, 2003-01-22 at 16:44, Michael Delorme wrote:
> 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
--
Monte Ohrt <monte@ispi.net>