Part of the EllisLab Network
   
 
is it possible to change the views dir. location ?
Posted: 30 September 2007 04:06 AM   [ Ignore ]  
Summer Student
Total Posts:  6
Joined  03-18-2007

is it possible to change the path from ./system/application/views to ./views ??

thanks.

Profile
 
 
Posted: 30 September 2007 05:05 AM   [ Ignore ]   [ # 1 ]  
Sr. Research Associate
RankRankRankRankRank
Total Posts:  4785
Joined  07-14-2006

Yes you have to change the loader class and the index.php to do it.

index.php (from line 78)

/*
|---------------------------------------------------------------
| DEFINE APPLICATION CONSTANTS
|---------------------------------------------------------------
|
| EXT        - The file extension.  Typically ".php"
| FCPATH    - The full server path to THIS file
| SELF        - The name of THIS file (typically "index.php)
| BASEPATH    - The full server path to the "system" folder
| APPPATH    - The full server path to the "application" folder
| PUBPATH       - The root directory of the public files
|
*/
define('EXT''.'.pathinfo(__FILE__PATHINFO_EXTENSION));
define('FCPATH'__FILE__);
define('SELF'pathinfo(__FILE__PATHINFO_BASENAME));
define('BASEPATH'$system_folder.'/');
define('PUBPATH',realpath(dirname(__FILE__))); 

PUBPATH is added.

system/libraries/Loader.php (line 55)

change

$this->_ci_view_path APPPATH.'views/'

to

$this->_ci_view_path PUBPATH.'views/'
Profile
 
 
Posted: 30 September 2007 05:34 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  6
Joined  03-18-2007

thanks dude. it works

Profile