Im try to make a Magento Admin area module but have got stuck with a link issue.
So far I have my required option in the menu bar but my problem comes when I click the link, I get a 404 error, I expected a grid. I am following a tutorial from excellencemagentoblog.
I understand that the action node within the children node of the tree is the link and I have followed my file path to create what I expected would be the correct link, but that failes and I cannot work out why?
My code is
excellence/employee/adminHtml.xml
<config>
<menu><!--action node, URL of admin controller-->
<employee module="employee">
<title>Employee</title>
<sort_order>90</sort_order>
<children>
<items module="employee"><!--adds menu item-->
<title>Manage Employees</title>
<sort_order>0</sort_order>
<action>employee/adminhtml_employee</action><!--Link-->
</items>
</children>
</employee>
</menu>
<acl>
<resources>
<all>
<title>Allow Everthing</title>
</all>
<admin>
<children>
<excellence_employee>
<title>Employee Module</title>
<sort_order>10</sort_order>
</excellence_employee>
</children>
</admin>
</resources>
</acl>
<layout>
<updates>
<employee>
<file>employee.xml</file>
</employee>
</updates>
</layout>
</config>
Excellence/Employee/controllers/AdminHtml/EmployeeController.php
class Excellence_Employee_Adminhtml_EmployeeController
extends Mage_Adminhtml_Controller_Action
{
public function indexAction()
{
$this->loadLayout();
$this->renderLayout();
}
}
I have tried logging out and back in again, but I still get the 404. What have i do wrong?
When I click the link the address is
http://magentodevtest.local/index.php/employee/adminhtml_employee/index/key/45435404fsd453453
I have added an image of my file structure, looking at the address bar, my understanding of how files are accessed says it should work (i obviously misunderstand something)
===EDIT===
I have cache disabled
My config.xml is as follows
<config>
<modules>
<Excellence_Employee>
<version>0.1.0</version>
</Excellence_Employee>
</modules>
<global>
<blocks>
<employee>
<class>Excellence_Employee_Block</class>
</employee>
</blocks>
<models>
<employee>
<class>Excellence_Employee_Model</class>
</employee>
</models>
<helpers>
<employee>
<class>Excellence_Employee_Helper</class>
</employee>
</helpers>
</global>
</config>
config.xml
in the question. Also...small tip: renameadminHtml.xml
toadminhtml.xml
. You will have problems if you don't on other OS.