I am trying to add my own module to the admin in version 1.x but I'm getting the blank page when I try to open the module
This is what I have managed to achieve so far;
- My module appears as a menu item within the admin
- When I click the link the controller/action fires but when I try to add the content and create the block I get a blank page.
My controller is as follows:
Foobar/Storelocator/controllers/Adminhtml/Store/IndexController.php
public function editAction() {
echo "We got here...";
....
$this->_addContent($this->getLayout()->createBlock('storelocator/adminhtml_store_edit')
....
}
I have the following block setup:
Foobar/Storelocator/Block/Adminhtml/Store/Edit.php
class Foobar_Storelocator_Block_Adminhtml_Store_Edit extends Mage_Adminhtml_Block_Widget_Form_Container
{
public function __construct() {
echo "____________";exit;
}
}
}
My config.xml:
<config>
....
<admin>
<routers>
<adminhtml>
<args>
<modules>
<storelocator before="Mage_Adminhtml">Foobar_Storelocator_Adminhtml</storelocator>
</modules>
</args>
</adminhtml>
</routers>
</admin>
<adminhtml>
<layout>
<updates>
<storelocator>
<file>storelocator.xml</file>
</storelocator>
</updates>
</layout>
</adminhtml>
</config>
It seems that the construct of the block isn't reached. I've spent a day checking my class names and folder structure over and over and the server logs have not revealed anything.
Any suggestions or help would be greatly appreciated.
<blocks>
tag look in your config.xml ?