|
Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon. |
|
View previous topic :: View next topic |
Author |
Message |
gtraxx Smarty Regular
Joined: 08 Jan 2008 Posts: 56
|
Posted: Thu Sep 29, 2011 10:20 am Post subject: compilation with setConfigDir |
|
|
Hello I have a question about "configdir" !
In my default global configuration, I:
Code: | $smarty->config_dir = array($_SERVER['DOCUMENT_ROOT']."/i18n/dom/"); |
I load a file named local.conf located in the base configuration and containing a variable named "title_name"
I decided to change the configuration later in the file using setConfigDir getConfigDir and I use to see the result.
I load a file of the same name containing another variable named "test", and replaces title_name in the template "test"
Code: | $smarty->setConfigDir(array(
'mail' => $_SERVER['DOCUMENT_ROOT'].'/i18n/mail'
));
$config_dir = $smarty->getConfigDir();
$firebug = new magixcjquery_debug_magixfire();
$firebug->magixFireDump('config', $config_dir); // array
// get all loaded config template vars
$firebug->magixFireDump('Config Vars', $smarty->getConfigVars());
$smarty->display('home/index.phtml');
|
To see the changes I have to delete files while compiling I have Code: | $smarty->compile_check = true; |
|
|
Back to top |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|