Follow by Email

Friday, May 8, 2015

Create a magento admin module & put link to magento menu with user role (ACL resources)

If you know how to create Magento module then create it first. After then you need to create a Magento controller for admin area.

class Package_Module_MycustomController extends Mage_Adminhtml_Controller_Action
{
    public function indexAction()
    {
         your code here.......
    }
}

Now if you want to create top menu in your magento admin, which can be enable or disable from admin role management area (ACL resources).

config.xml
<adminhtml>
   
        <menu>
            <package_module translate="title" module="package_module">
                <title>Manage Portal</title>
                <sort_order>9999</sort_order>
                <action>mycustom/userauth/index</action>               
            </package_module>
        </menu>
        <acl>
        <resources>
            <admin>
                <children>
                    <package_module translate="title" module="package_module">
                        <title>Manage Portal</title>
                        <sort_order>9999</sort_order>
                        <action>mycustom/userauth/index</action>   
                    </package_module>
                </children>
            </admin>
        </resources>
    </acl>
   
    </adminhtml>
 

No comments:

Post a Comment