在magento的Customers菜单下创建一个子菜单

时间:2014-02-11 17:47:07

标签: magento menu adminhtml

我知道如何在config.xml中的目录主导航菜单下创建一个子菜单:

<menu>
    <catalog>
    <children>
        <testimonials>
                <title>Manage Testimonials</title>
                <sort_order>1</sort_order>
                <action>adminhtml/adminhtml_testimonials</action>
        </testimonials>
    </children>
</catalog>
</menu>

但是如何在“客户菜单”下创建子菜单?我试过了:

<menu>
    <customers>
    <children>
        <testimonials>
                <title>Manage Testimonials</title>
                <sort_order>1</sort_order>
                <action>adminhtml/adminhtml_testimonials</action>
        </testimonials>
    </children>
</customers>
</menu>

但它不起作用。任何建议都将不胜感激。

1 个答案:

答案 0 :(得分:1)

假设这不是权限问题,并且您有清除缓存并重新登录。

在config.xml中

<?xml version="1.0"?>
<config>  
  ....
  <adminhtml>  <---
    <menu>
      <customer>
        <children>
          <testimonials>
            <title>Manage Testimonials</title>
            <sort_order>0</sort_order>
            <action>adminhtml/adminhtml_testimonials</action>
          </testimonials>
        </children>
      </customer>
    </menu>
  </adminhtml>  <---      
 ....

在adminhtml.xml中

<?xml version="1.0"?>
<config> 
  ... 
  <menu>
      <customer>
        <children>
          <testimonials>
            <title>Manage Testimonials</title>
            <sort_order>0</sort_order>
            <action>adminhtml/adminhtml_testimonials</action>
          </testimonials>
        </children>
      </customer>
    </menu>
 ...