gpt4 book ai didi

css - magento : menu class don't turn to active

转载 作者:行者123 更新时间:2023-11-28 13:53:44 25 4
gpt4 key购买 nike

我在 magento admin 中制作了自己的模块,并添加了一个带有 config.xml 文件的菜单:

 <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>

感谢您的帮助:)

最佳答案

我找到了:

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

在 Adminhtml Controller 中使用它!

关于css - magento : menu class don't turn to active,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11116406/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com