Search code examples
magentomenuadminhtml

create a submenu under Customers Menu in magento


I know how to create a sub-menu under catalog main navigation menu in config.xml which is:

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

but how do I create a sub-menu under Customers Menu? I tried:

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

but it doesn't work. Any suggestion would be appreciated.


Solution

  • Assuming that this is not a permission issue and you have clear cache and re-login.

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

    or

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