I'm trying to rewrite Mage_Adminhtml_Cms_Wysiwyg_ImagesController
to override its indexAction()
. I seem to be able to rewrite it successfully as the request is being routed to it, but I've been unable to load layout in the action.
config.xml:
<?xml version="1.0"?>
<config>
<modules>
<Mynamespace_Mymodule>
<version>0.1.0</version>
</Mynamespace_Mymodule>
</modules>
<global>
<blocks>
<mynamespace_mymodule>
<class>Mynamespace_Mymodule_Block</class>
</mynamespace_mymodule>
</blocks>
</global>
<admin>
<routers>
<adminhtml>
<use>admin</use>
<args>
<modules>
<Mynamespace_Mymodule before="Mage_Adminhtml">Mynamespace_Mymodule_Adminhtml</Mynamespace_Mymodule>
</modules>
</args>
</adminhtml>
</routers>
</admin>
<adminhtml>
<layout>
<updates>
<mynamespace_mymodule>
<file>mynamespace/mymodule.xml</file>
</mynamespace_mymodule>
</updates>
</layout>
</adminhtml>
</config>
mymodule.xml (layout file):
<?xml version="1.0"?>
<layout version="0.1.0">
<mynamespace_mymodule_adminhtml_cms_wysiwyg_images_index>
<update handle="adminhtml_cms_wysiwyg_images_index" />
<reference name="content">
<block name="mynamespace_mymodule.content"
type="mynamespace_mymodule/cms_wysiwyg_images_content"
template="cms/browser/content.phtml"
/>
</reference>
</mynamespace_mymodule_adminhtml_cms_wysiwyg_images_index>
</layout>
The controller is instantiated but the block class isn't.
Calling $this->getLayout()->getUpdate()->getHandles()
in the controller action results in an empty array; it doesn't seem to have any handles.
Why might this be the case and what should I do to get the handles loaded?