I apologize for not explaining everything from the beginning. This is what I have done in one of my configuration tests with ME & smarty Template System. I will start with the autoload file, your routes.php file will stay as above. Ofcourse you can do some trickiness it there to load another controller(I don’t see a need for this due to modules) When you use ME it this configuration everythign becomes a module that is loaded from the url. I check my method or current_action inside my module and the only thing on top is the error flash messages or contact(email send function),etc.which is mapped from the index function via function_exists. Please try to follow along as I give you some files for example.
autoload.php
$autoload['libraries'] = array('database','session','validation','smarty_parser','environ');
$autoload['helper'] = array('url','file','form','modules');
$autoload['language'] = array('site'); //app/languages/english/site_lang.php
make sure to add smarty libs to your app/libraries/smarty/ directory, create a app/libraries/smarty_parser.php file and app/config/smarty_parser.php(follow 1st post link) In the research that I have conducted I have found that all you need is a default_layout.php that contains this code
<?=$template;?>
and teh rest is up to smarty and my special site environment variable library. I will show a basic configuration of this and my lib to hold your environment configuration.
inside my smarty I have added these to setting to control my template delimiters (this way anything smarty will show as an html comment and you can tell you designer not to touch the comments but work around them, plus it looks easier on the eyes
$config['left_delimiter'] = '<!--{';
$config['right_delimiter'] = '}-->';
okay, this is where the fun begins, yay, fun.
create a environ.php inside app/config/ this will hold your template configuration
//templates folder name in filesystem
$config['templates_folder']='templates/';
//current active template name
$config['template_name']="CLIENT_1";
//template config file name located inside template_name/config/ directory
$config['theme_config_file']='theme';
I will continue with app/libraries/environ.php in next post, I thank you for being patient. I’m sure you will be pleased with it.
