Hi,
I was thinking about extending all my controllers from the indexController. I have in the index controller a init() function that does alot of stuff. This is not executed upon fooController request.
I allready have a registered a viewSetup plugin. And this is executed on all requests and thats just fine.
My problem is a have blog module which needs to do some stuff, that don't need to be done in the news module.
A good example is my secondary menu, its specific to the active module.
class fooController extends indexController
In this way i could also override the init() function in indexController from within fooController. Unfortunately the autoloader can't find the indexController class.
The following works though, if i require the indexController.php file first
<?php
require_once('indexController.php);
class fooController extends indexController {
function init() {
parent::init();
// Do changes to, ie. setup controller specific menu, or add menu items.
}
}
Ideas much appreciated :)