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

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

thanks.

Profile
 
 
Posted: 30 September 2007 03:05 AM   [ Ignore ]   [ # 1 ]  
Sr. Research Associate
RankRankRankRankRank
Total Posts:  4839
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 03:34 AM   [ Ignore ]   [ # 2 ]  
Summer Student
Total Posts:  9
Joined  03-18-2007

thanks dude. it works

Profile
 
 
   
 
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 721, on January 06, 2010 09:38 AM
Total Registered Members: 115027 Total Logged-in Users: 63
Total Topics: 122462 Total Anonymous Users: 3
Total Replies: 647374 Total Guests: 479
Total Posts: 769836    
Members ( View Memberlist )