views:

62

answers:

1

What I'm trying to achieve is to use the news controller as the default controller for my default module, and my index controller for my admin module.

As of right now, because my Admin Bootstrap is being applied, my default module's default controller name is now index instead of news ( I want the latter ). The admin itself is fine. How could I edit my settings such to get what I need?

My application.ini settings:

bootstrap.path = APPLICATION_PATH "/Bootstrap.php"
bootstrap.class = "Bootstrap"
resources.modules[] = ''
resources.frontController.defaultControllerName = "news"
resources.frontController.defaultModule = "default"
resources.frontController.defaultAction = "index"
resources.frontController.controllerDirectory = APPLICATION_PATH "/controllers"
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"
resources.frontController.moduleControllerDirectoryName = "controllers"
resources.view[] = ''
admin.resources.frontController.defaultControllerName = index
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"

I have just my standard, vanilla structure along with modules/admin ( I had to rename the IndexController class name to be Admin_IndexController and I had to create a Bootstrap in modules/admin ) in order for the admin module's default controller to be index and not news.

+1  A: 

An easy fix would be to have an indexController and to forword actions to newsController.

But if you want you could go ahead and subclass the control dispatcher to return different default controllers based on module http://framework.zend.com/manual/en/zend.controller.dispatcher.html

solomongaby
So there's no real fix to this? mm
meder
updated for new answer
solomongaby