Re: [SMARTY] Set config file from php?
| From: | Monte Ohrt | Date: | Thu, 09 May 2002 13:19:05 +0000 |
| Subject: | Re: [SMARTY] Set config file from php? | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-4112@lists.php.net to get a copy of this message | ||
{config_load file="$template/display.conf"}
(in config_dir)
/mytheme1/display.conf
/mytheme2/display.conf
...
Ivan Voras wrote:
I am looking for a nice way to specify config file for Smarty templates from PHP. I use config files for color themes and I would like to be able to just specify a different config file when the user changes the theme WITHOUT having to insert the required smarty command in each and every template. I expect something like: $smarty = new Smarty(); $smarty->loadConfig ($currentconfig) I did a workaround, involving modifying Smarty_compiler to insert the hard-coded required output, but it is very messy and I need to update it when new versions of Smarty come out. -- -- Ashes to ashes, DOS to DOS ivoras @ fer.hr-- Monte Ohrt <monte@ispi.net> Director of Technology, ispi Inc.