I am new in magento and creating a module for use of both frontend and backend. Module works perfectly on frontend but it does not work in Magento Admin. It goes to 404 page.Here is the config file and IndexController
file. Any help?
config.xml
<config>
<modules>
<Mymodule_Customerpage>
<version>1.0.0</version>
</Mymodule_Customerpage>
</modules>
<admin>
<routers>
<the_name_of_this_element_is_not_important_it_should_be_unique>
<use>admin</use>
<args>
<modules>
<Mymodule_Customerpage before="Mage_Adminhtml">Mymodule_Customerpage</Mymodule_Customerpage>
</modules>
</args>
</the_name_of_this_element_is_not_important_it_should_be_unique>
</routers>
</admin>
<adminhtml>
<menu>
<tutorial_menu translate="title" module="mymodule_customerpage">
<title>Artwork</title>
<sort_order>9999</sort_order>
<children>
<first_page module="mymodule_customerpage">
<title>Artwork</title>
<action>adminhtml/mymodule_customerpage/index</action>
</first_page>
</children>
</tutorial_menu>
</menu>
</adminhtml>
<frontend>
<layout>
<updates>
<mymodule_customerpage module="mymodule_customerpage">
<file>mymodule_customerpage.xml</file>
</mymodule_customerpage>
</updates>
</layout>
<routers>
<mymodule_customerpage>
<use>standard</use>
<args>
<module>Mymodule_Customerpage</module>
<frontName>mymodule_customerpage</frontName>
</args>
</mymodule_customerpage>
</routers>
</frontend>
<global>
<models>
<mymodule_customerpage>
<class>Mymodule_Customerpage_Model</class>
<resourceModel>mymodule_customerpage_mysql4</resourceModel>
</mymodule_customerpage>
<mymodule_customerpage_mysql4>
<class>Mymodule_Customerpage_Model_Mysql4</class>
<entities>
<customerpage>
<table>customerpage</table>
</customerpage>
</entities>
</mymodule_customerpage_mysql4>
</models>
<resources>
<mymodule_customerpage_setup>
<setup>
<module>Mymodule_Customerpage</module>
</setup>
<connection>
<use>core_setup</use>
</connection>
</mymodule_customerpage_setup>
<mymodule_customerpage_write>
<connection>
<use>core_write</use>
</connection>
</mymodule_customerpage_write>
<mymodule_customerpage_read>
<connection>
<use>core_read</use>
</connection>
</mymodule_customerpage_read>
</resources>
<helpers>
<mymodule_customerpage>
<class>Mymodule_Customerpage_Helper</class>
</mymodule_customerpage>
</helpers>
Mymodule/Customerpage/Controller/Adminhtml/IndexController.php
class Mymodule_Customerpage_Adminhtml_IndexController extends Mage_Adminhtml_Controller_Action{
public function indexAction()
{
$this->loadLayout();
$block = $this->getLayout()
->createBlock('core/text', 'adminhtml_artwork')
->setText('<h1>This is a text block</h1>');
$this->_addContent($block);
$this->renderLayout();
} }