2012-06-20 38 views
0

我做了我自己的模塊在Magento管理,我已經加入config.xml文件的菜單:Magento的:菜單類不轉活躍

<adminhtml> 
     <!-- The <layout> updates allow us to define our block layouts in a separate file so are aren't messin' with the Magento layout files. --> 
     <layout> 
      <updates> 
       <ineractivebanner> 
        <file>adminbanner.xml</file> 
       </ineractivebanner> 
      </updates> 
     </layout> 
     <!-- The <acl> section is for access control. Here we define the pieces where access can be controlled within a role. --> 
     <acl> 
      <resources> 
       <admin> 
        <children> 
         <ineractivebanner> 
          <title>Banner Menu Item</title> 
          <children> 
           <interactivebannermenu> 
            <title>Banner Menu Item</title> 
           </interactivebannermenu> 
          </children> 
         </ineractivebanner> 
        </children> 
       </admin> 
      </resources> 
     </acl> 
     <menu> 
     <interactivebanner> 
      <title>Banners</title> 
      <sort_order>71</sort_order> 
      <children> 
       <interactivebannermenu> 
        <title>Manage Banners</title> 
        <sort_order>1</sort_order> 
        <action>interbanner/adminhtml_banner/index</action> 
       </interactivebannermenu> 
      </children> 
     </interactivebanner> 
    </menu> 
    </adminhtml>  

一切正常,但菜單在我的模塊中,類不會轉到活動狀態!

<li class="parent level0" onmouseout="Element.removeClassName(this,'over')" onmouseover="Element.addClassName(this,'over')"> 
<a class="" onclick="return false" href="#"> 
<span>Banners</span> 
</a> 
<ul> 
</li> 

感謝您的幫助:)

回答

0

我發現:

protected function _initAction() { 
    $this -> loadLayout() -> _setActiveMenu(' ') -> _addBreadcrumb(' ', ' '); 
    return $this; 
} 

使用它在Adminhtml控制器!