Welcome Guest, Not a member yet? Register   Sign In
How to add multiple themes to your CI app - Wordpress-like theming for CI
#11

[eluser]Jayden[/eluser]
Excellent! Thanks for sharing that. Themes would make it more "interesting"!
#12

[eluser]JasonS[/eluser]
Just stopping by to say thanks a lot. Such a simple solution to a problem I am sure many people will approach.
#13

[eluser]JasonS[/eluser]
Just stopping by to say thanks a lot. Such a simple solution to a problem I am sure many people will approach.
#14

[eluser]Unknown[/eluser]
hi im getting error when i try to load on controller...

Fatal error: Call to undefined method CI_Loader:Confusedet_theme() in <controller file path>

im using CI 2.0.3
#15

[eluser]JoostV[/eluser]
Hi Dakshika,

This code is yet not updated to CI 2. Feel free to fix it and post the fix here Wink
Thanks in advance,

Joost
#16

[eluser]nuclearmaker[/eluser]
Tested with CI 2.0

Quote:**put the code in application/core and name as MY_Loader.php
Code:
&lt;?php
class MY_Loader extends CI_Loader{

    public $theme = 'default';
    
    public function __construct()
    {
        parent::__construct();
        
        $this->set_theme($this->theme);    
    }
    
    public function set_theme($theme_name)
    {
        $this->theme = $theme_name;
        $this->_ci_view_paths = array(FCPATH.'themes/'. $this->theme .'/views/'    => TRUE);
    }
}
#17

[eluser]JoostV[/eluser]
@nuclearmaker thanks!




Theme © iAndrew 2016 - Forum software by © MyBB