kamikaze_pilot
kamikaze_pilot

Reputation: 14834

how do I use a different index controller in Zend other than indexcontroller

if you use zend framework and just go to http://localhost, the site will call the index action of index controller.....is there a way to configure zend such that it will call some other controller when you access the index site?

thanks in advance

Upvotes: 0

Views: 237

Answers (2)

Gordon
Gordon

Reputation: 316959

Either set the desired values through the FrontController's API

or, when using Zend_Application_Resource_FrontController, you can set the desired values in your application.ini and they get applied automatically during bootstrap.

resources.frontController.defaultControllerName = "site"
resources.frontController.defaultAction = "home"
resources.frontController.defaultModule = "static"

Upvotes: 5

netcoder
netcoder

Reputation: 67695

Use Zend_Controller_Front:

    $front = Zend_Controller_Front::getInstance();
    $front->setDefaultControllerName('myDefaultController');

Upvotes: 2

Related Questions