I would like to redirect the admin upon login to my custom module dashboard. I do not want to override the existing dashboard, but run them in parallel. So I've done the following:
config.xml:
<admin_session_user_login_success>
<observers>
<module>
<type>singleton</type>
<class>Namespace_Module_Model_Observer</class>
<method>custom_dashboard_redirect</method>
</module>
</observers>
</admin_session_user_login_success>
Observer.php:
public function custom_dashboard_redirect(){
Mage::app()->getFrontController()->getResponse()->setRedirect(Mage::getUrl('*/custom_dashboard/*'));
Mage::app()->getResponse()->sendResponse();
exit;
}
Unfortunately this seems to simply redirect to the standard dashboard.
However, if I redirect to sales_order
instead of custom_dashboard
, it does the redirect correctly.
P.S. I can acccess custom_dashboard
fine through the menu I've created, just not via this redirect. Would appreciate some pointers