How does CodeIgniter change the view folder path ?. Here is the code used to control the view folder path by changing the view folder path using CodeIgniter: systemcoreloader. phppublicfunctionadd_package_path ($ path, $ view_cascade. here is the CodeIgniter method to change the view folder path.
Code for controlling the view folder path: system/core/loader. php
Public function add_package_path ($ path, $ view_cascade = TRUE) {$ path = rtrim ($ path ,'/'). '/'; array_unshift ($ this-> _ ci_library_paths, $ path); array_unshift ($ this-> _ ci_model_paths, $ path); array_unshift ($ this-> _ ci_helper_paths, $ path); $ this-> _ ci_view_paths = array ($ path. 'views/'=> $ view_cascade) + $ this-> _ ci_view_paths; // add the configuration file $ config = & $ this-> _ ci_get_component ('config '); array_unshift ($ config-> _ config_paths, $ path );}
Statement for changing the view folder:
$this->load->add_package_path ( FCPATH . 'skins/' . base_skins . '/' );
Note:
Create a new view folder under the newly created skins folder. all view files are stored in the skins/views folder.
The code used to control the path of the view folder: system/core/loader. php public function add_package_path ($ path, $ view_cascade...