i do the same thing with a controller plugin:
Quote:
class DSF_Controller_Plugin_SetPagePath extends Zend_Controller_Plugin_Abstract
{
/**
* this function routes all requests that come in to the default module to the index controller / index action
*
* @param zend_controller_request $request
*/
public function preDispatch($request)
{
if($request->module == 'public')
{
$request->setControllerName('index');
$request->setActionName('index');
}
}
}
|
then to use it (in bootstrap):
Quote:
// setup controller
$frontController = Zend_Controller_Front::getInstance();
$frontController->throwExceptions(true);
$frontController->registerPlugin(new DSF_Controller_Plugin_SetPagePath());
|
If you want to see exactly how this works you can download the source from google code.