Posting in the Magento forums has been disabled pending the implementation of a new and improved forum solution which should better serve the community.

For new questions please post at magento.stackexchange.com, the community-run support site for the Magento community. We will be providing updates on the new forum solution soon. For questions or concerns please email community@magento.com.

Magento Forum

block rewrite problem
 
Lyndon_Corleone
Jr. Member
 
Total Posts:  27
Joined:  2012-08-15
 

I write a module to rewrite the Mage/Page/Block/Html/Header.php,my new Header.php is to set another template,and i can see my template .

The problem is that when i disable my module,clean cache and session,magento can’t find the its original header.phtml,unless i remove

the <rewrite> part in <mymodule>/etc/config.xml.I don’t why this happen and how to fix it ,could someone help me?

TestLib/MyLib/etc/config.xml

<config>
<module>
<TestLib_MyLib>
<version>0.1.0</version>
</TestLib_MyLib>
</module>
<frontend>
<routers>
<mylib>
<use>standard</use>
<args>
<module>TestLib_MyLib</module>
<frontName>mylib</frontName>
</args>
</mylib>
</routers>
</frontend>
<global>
<helpers>
<mylib>
<class>TestLib_MyLib_Helper</class>
</mylib>
</helpers>
<blocks>
<page>
<rewrite>
<html_header>TestLib_MyLib_Block_Html_Header</html_header>
</rewrite>
</page>
</blocks>
</global>
</config>

Image Attachments
h.jpg
 
Magento Community Magento Community
Magento Community
Magento Community
Magento Community
Magento Community
Back to top