I have a requirement which would need me to write an extension that overrides a class from another extension which in turn uses the rewrite to override a core module.
Whilst I have the feeling that it would mostly relate to the config.xml file in my extension it have tried the following:
<config>
<modules>
<Leafcutter_CustomMenu>
<version>1.0</version>
</Leafcutter_CustomMenu>
</modules>
<global>
<blocks>
<custom_menu>
<rewrite>
<topmenu>Leafcutter_CustomMenu_Block_Topmenu</topmenu>
</rewrite>
</custom_menu>
</blocks>
</global>
With the above code what I am intending on doing is try to override the WP_CustomMenu_Block_Topmenu block from the custom menu extension, which in turn overrides the Mage_Page_Block_Html_Topmenu block.
I have tried the above but it keeps on getting the WP_CustomMenu_Block_Topmenu and not my extended class. I know that if I removed the above code and replaced it with this:
<config>
<modules>
<Leafcutter_CustomMenu>
<version>1.0</version>
</Leafcutter_CustomMenu>
</modules>
<global>
<blocks>
<page>
<rewrite>
<html_topmenu>Leafcutter_CustomMenu_Block_Topmenu</html_topmenu>
</rewrite>
</page>
</blocks>
</global>
</config>
and removed the code responsible in the original plugin, I can achieve what I want. But for curiosity's sakes how would I override that extension without having to go into the config file in the extension and comment it out, as I consider this pretty hacky.
Thanks.
WP_CustomMenu
extension by adding inetc/modules/Leafcutter_CustomMenu.xml
this<depends><WP_CustomMenu /></depends>