[eluser]laytone[/eluser]
I usually extend my controller and add a _showPage() function to display my data in a template from any controller. I also keep track of other things in my extended controller (MY_Controller)
My question is this:
I want to create an area of my site that is a little different than the rest (i.e. an admin area)
How can a create a second extended controller?
This is what I have:
Code:
class MY_Controller extends Controller(){
function __construct(){
parent::Controller();
}
}
Code:
class Sitepage extends MY_Controller(){
function __construct(){
parent::__construct();
}
}
And I would like to do this to:
Code:
class MY_Admin_controller extends Controller(){
function __construct(){
parent::Controller();
}
}
Code:
class Site_admin extends MY_Admin_controller(){
function __construct(){
parent::__construct();
}
}
Can this be done? I would like to add my auth code and stuff in my 'MY_Admin_controller' class and house the admin controllers in a directory like this 'controllers/admin/controllers.php'