Let me start with the things that I did and how am I using some things to get results
I have set up modular structure as:
application/
/configs
/layouts
/models
/modules
/users
/profile
/frontend
/backend
/controllers
/views
....
I write a plugin that does addes changes with FrontController->setModuleControllerDirectoryName() FrontController->addModuleDirectory() and It is all good I have a changed all the directories according weather admin page is requested in the url or not (it is some thing like /admin/some/some)
Let's say I have a single layout for anything that is related to Profile viewing , in this case the "Profile" module. The Profile layout is divided into three parts
In the layout I was pulling out the Profile/PhotoController 's index action with a action()
$this->action('index', 'photo', 'profile');
Then I have faced few issues 1. Can get passed Params inside the Photo Controller when calling ( profile/profile/index); 2. found out that helper Action() is evil cause it starts another dispatching loop =) --- and now I am thinking that my approach on plugging in controllers modules into layout also evil =). anyhow how Should I deal with plugging in some controllers (another module controllers) into the layout ?