简体   繁体   中英

zend modules default controller

Hy guys,

how can i set the default modules controller ??

i need that if there isn't controller in module folder, i come at default module controller and view!

for example i type into the browser: http://192.168.1.100/Testmoduli/public/givep/

where givep is my module without IndexController.php, now i need to come at my default module (artapp) into IndexController.php

resources.frontController.defaultController = "index" 
resources.frontController.defaultAction = "index" 
resources.frontController.defaultModule = "artapp" 
resources.frontController.moduleDirectory = APPLICATION_PATH "/modules"

thanks!

EDIT:

so..

If I try to launch an action that does not exist, it is automatically launched in the same action in the form of default?

to launch this action can i only catch the action into controller error??

thanks!

You can do this in your ErrorController :

// in errorAction()
if($this->_error->type == 'EXCEPTION_NO_CONTROLLER'){
     // redirect or forward where you want
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM