Add a main menu entry in Magento

This is how you can add a main menu entry to the Magento main menu in your modules adminhtml.xml:

<?xml version="1.0" encoding="UTF-8"?>
<config>
    <menu>
        <sheldon_wysiwyg module="sheldon_wysiwyg">
            <title>WYSIWYG</title>
            <sort_order>88</sort_order>
            <children>
                <test module="sheldon_wysiwyg" translate="title">
                    <title>Test</title>
                    <sort_order>0</sort_order>
                    <action>adminhtml/sheldon_wysiwyg/data</action>
                </test>
            </children>
        </sheldon_wysiwyg>
    </menu>
    <acl>
        <resources>
            <all>
                <title>Allow Everything</title>
            </all>
            <admin>
                <children>
                    <sheldon_wysiwyg>
                        <title></title>
                        <sort_order>70</sort_order>
                        <children>
                            <posts>
                                <title>Manage Posts</title>
                                <sort_order>0</sort_order>
                            </posts>
                        </children>
                    </sheldon_wysiwyg>
                </children>
            </admin>
        </resources>
    </acl>
</config>

Attention: As you can see, you have to define the right ACLs for the menu (@see Implement ACL (Access-Control-List) for own Magento modules)

1 thoughts on “Add a main menu entry in Magento

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.