local vs core controller

前端 未结 1 1537
时光取名叫无心
时光取名叫无心 2021-01-24 05:55

I am adding new column and action in the local admin app/code/local/Mage/Adminhtml/Block/Catalog/Product/Grid.php which works fine, however. The local controller/app/code/local

相关标签:
1条回答
  • 2021-01-24 06:34

    Sorry, my bad...long hours working makes me less careful.

    For every module it has to be enabled in local or core space. By default, they all are enabled in the core space. To enable Adminhtml module i had to add Mage_Adminhtml.xml file in app/etc/Modules. In the Mage_Adminhtml.xml file i have to specify local between codePool tags like below:

     <?xml version="1.0"?>
       <config>  
           <modules>  
             <Mage_Adminhtml>
                        <active>true</active>  
                        <codePool>local</codePool>
             </Mage_Adminhtml>   
           </modules>   
      </config> 
    

    My mistake was thinking i needed this for Catalog Module while actually for Adminhtml since I am working with admin controllers. Once added Mage_Adminhtml.xml it uses local controllers.

    0 讨论(0)
提交回复
热议问题