9
Adding New Menu Item In Magento 2 Custom Module Provided By Mageworld A Leading Magento Provider

Adding New Menu Item In Magento 2 Custom Module

Embed Size (px)

Citation preview

Page 1: Adding New Menu Item In Magento 2 Custom Module

Adding New Menu Item In Magento 2 Custom Module

Provided By Mageworld A Leading Magento Provider

Page 2: Adding New Menu Item In Magento 2 Custom Module

Outline

Step 1: Create Menu File

Step 2: Create Route File

Step 3: Add Role For Each Menu Item

Page 4: Adding New Menu Item In Magento 2 Custom Module

Step 1: Create Menu File Create file: app/code/Tutorial/SimpleNews/etc/adminhtml/menu.xml  Purpose: Declare the menu item of your module

Page 5: Adding New Menu Item In Magento 2 Custom Module

Step 2: Create Route File

Create file: app/code/Tutorial/SimpleNews/etc/adminhtml/routes.xml Purpose: Declare the router of your module for backend 

Page 6: Adding New Menu Item In Magento 2 Custom Module

Step 3: Add Role For Each Menu Item

Open this file: app/code/Tutorial/SimpleNews/etc/acl.xml 

Modify source code

Page 7: Adding New Menu Item In Magento 2 Custom Module

Step 3: Add Role For Each Menu Item

Access to the backend site then clear Magento cache and see the result

Page 8: Adding New Menu Item In Magento 2 Custom Module

Step 3: Add Role For Each Menu Item  This is the additional role (System > Permissions > User Roles)