Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
Dedicated server web hosting provided by Guru-host.eu.
compilation with setConfigDir

 
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3
View previous topic :: View next topic  
Author Message
gtraxx
Smarty Regular


Joined: 08 Jan 2008
Posts: 54

PostPosted: Thu Sep 29, 2011 10:20 am    Post subject: compilation with setConfigDir Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Smarty 3 All times are GMT
Page 1 of 1

 
Jump to:  
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
Protected by Anti-Spam ACP