-2

I have the below code and it does not work for me. I want to insert a submenu which is Distributor to an existing menu which is MJSI.

config.xml

<config>
<modules>
    <Mjsi_Distributor>
        <version>1.0.0</version>
    </Mjsi_Distributor>
</modules>
<global>
    <models>
        <distributor>
           <class>Mjsi_Distributor_Model</class> 
        </distributor>
    </models>
    <blocks>
        <distributor>
            <class>Mjsi_Distributor_Block</class>
        </distributor>
    </blocks>
    <helpers>
        <distributor>
            <class>Mjsi_Distributor_Helper</class>
        </distributor>
    </helpers>
</global>

adminhtml.xml

<config>
<menu>
    <distributor translate="title" module="distributor">
        <title>Distributor</title>
        <sort_order>1000</sort_order>
        <action>adminhtml/distributor</action>
    </distributor>
</menu>

0

1 Answer 1

0

In your adminhtml.xml you should specify something similar to this:

<config>
<acl>
    <resources>
        <admin>
            <children>
                <system>
                    <children>
                        <config>
                            <children>
                                <mjsi_distributor translate="title" module="mjsi_distributor">
                                    <title>Distributor</title>
                                </mjsi_distributor>
                            </children>
                        </config>
                    </children>
                </system>
                <mjsi_distributor translate="title" module="mjsi_distributor">
                    <title>Distributor</title>
                    <children>
                        <distributor translate="title" module="mjsi_distributor">
                            <title>Distributor</title>
                            <sort_order>0</sort_order>
                        </distributor>
                    </children>
                </mjsi_distributor>
            </children>
        </admin>
    </resources>
</acl>
<menu>
    <mjsi>
        <children>
            <distributor translate="title" module="mjsi_distributor">
                <title>Distributor</title>
                <action>adminhtml/distributor_distributor</action>
                <sort_order>0</sort_order>
            </distributor>
        </children>
    </mjsi>
</menu>
3
  • I edited your code is this correct on my side?
    – Lester
    Sep 1, 2017 at 17:16
  • Yes it was only an example prepared using the information provided in your question. Glad it helped :)
    – diazwatson
    Sep 2, 2017 at 10:36
  • I've edited the most correct one.
    – Lester
    Sep 5, 2017 at 18:20

Not the answer you're looking for? Browse other questions tagged or ask your own question.