Adding New Menu Item In Magento 2 Custom Module

Preview:

Citation preview

Adding New Menu Item In Magento 2 Custom Module

Provided By Mageworld A Leading Magento Provider

Outline

Step 1: Create Menu File

Step 2: Create Route File

Step 3: Add Role For Each Menu Item

Step 1: Create Menu File Create file: app/code/Tutorial/SimpleNews/etc/adminhtml/menu.xml  Purpose: Declare the menu item of your 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 

Step 3: Add Role For Each Menu Item

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

Modify source code

Step 3: Add Role For Each Menu Item

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

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

Recommended