Re: [SMARTY] loading configs files

From: Date: Wed, 22 Jan 2003 23:29:19 +0000
Subject: Re: [SMARTY] loading configs files
References: 1 2  Groups: php.smarty.general 
Request: Send a blank email to php-smarty-general+get-7303@lists.php.net to get a copy of this message
Thanks for your quick answer. ok, I didn't understand we can set the config_dir. I added a $smarty->config_dir = "path/to/rootdoc/configs"; in my setup file and it works fine... Thanks for that and thanks for developping Smarty. Michael A 16:57 22/01/2003 -0600, vous avez écrit : >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> > > _________________________________________ Michael Delorme 41 bd de Brou 01000 Bourg-en-Bresse tel/fax 04 74 23 26 10 mailto:michael@delorme.nom.fr _________________________________________

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