diff options
author | Eric Barnes <eric@ericlbarnes.com> | 2011-08-21 23:35:07 +0200 |
---|---|---|
committer | Eric Barnes <eric@ericlbarnes.com> | 2011-08-21 23:35:07 +0200 |
commit | 644ed9000c39289a66d8b52f10d54168f006b717 (patch) | |
tree | add34415d01955cd350e5ef6c993aeb021954c9b /index.php | |
parent | 597aff7b9358135ca2566164541267650466b693 (diff) | |
parent | 393377fd247f38d57a7324515b57fed5d84b28ff (diff) |
Merge pull request #235 from JoeCianflone/develop
Ability to move the view folder out of the Application directory
Diffstat (limited to 'index.php')
-rw-r--r-- | index.php | 33 |
1 files changed, 33 insertions, 0 deletions
@@ -73,6 +73,23 @@ if (defined('ENVIRONMENT')) * */ $application_folder = 'application'; + +/* + *--------------------------------------------------------------- + * VIEW FOLDER NAME + *--------------------------------------------------------------- + * + * If you want to move the view folder out of the application + * folder set the path to the folder here. The folder can be renamed + * and relocated anywhere on your server. If blank, it will default + * to the standard location inside your application folder. If you + * do move this, use the full server path to this folder + * + * NO TRAILING SLASH! + * + */ + $view_folder = ''; + /* * -------------------------------------------------------------------- @@ -190,6 +207,22 @@ if (defined('ENVIRONMENT')) define('APPPATH', BASEPATH.$application_folder.'/'); } + + // The path to the "views" folder + if (is_dir($view_folder)) + { + define ('VIEWPATH', $view_folder .'/'); + } + else + { + if ( ! is_dir(APPPATH.'views/')) + { + exit("Your view folder path does not appear to be set correctly. Please open the following file and correct this: ".SELF); + } + + define ('VIEWPATH', APPPATH.'views/' ); + } + /* * -------------------------------------------------------------------- |