adding new menu item in magento 2 custom module

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

Upload: mageworld

Post on 15-Apr-2017

708 views

Category:

Software


1 download

TRANSCRIPT

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)