This should be a fairly easy one, I hope. I've looked over Alan Storm's tutorial on the topic a hundred times, but still can't figure out what I'm missing. I just want to get my custom admin page to hit my controller's indexAction(), where I will then be rendering my layout, etc. For this question I'm just looking for an answer that hits my controller die statement when I click on my page in the admin.
Have already made sure:
- cache is cleared
- module is enabled and working, overall
Here's the relevant code:
app/code/local/Company/MyModule/etc/config.xml:
<config>
<modules>
<Company_MyModule>
<version>1.0.0</version>
</Company_MyModule>
</modules>
<global>
<blocks>
<mymodule>
<class>Company_MyModule_Block</class>
</mymodule>
</blocks>
<helpers>
<mymodule>
<class>Company_MyModule_Helper</class>
</mymodule>
</helpers>
</global>
<admin>
<routers>
<adminhtml>
<args>
<modules>
<mymodule before="Mage_Adminhtml">Company_MyModule_Adminhtml</mymodule>
</modules>
</args>
</adminhtml>
</routers>
</admin>
<adminhtml>
<menu>
<mymodule module="mymodule">
<title>My Custom Page</title>
<sort_order>100</sort_order>
<action>adminhtml/MyModule/homepage/index</action>
</mymodule>
</menu>
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<mymodule translate="title" module="mymodule">
<title>MyModule</title>
<sort_order>1000</sort_order>
<children>
<mymodulebackend translate="title" module="mymodule">
<title>My Custom Page</title>
</mymodulebackend>
</children>
</mymodule>
</children>
</admin>
</resources>
</acl>
</adminhtml>
</config>
app/code/local/Company/MyModule/controllers/Adminhtml/MyModule/HomepageController.php:
<?php
die();
class Company_MyModule_Adminhtml_MyModule_HomepageController extends Mage_Adminhtml_Controller_Action
{
/**
* Just a test action
*/
public function indexAction()
{
die('here');
$this->loadLayout();
$this->renderLayout();
}
}
Help greatly appreciated!