View
713
Download
1
Category
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
Reviews
Continue using the Tutorial_SimpleNews moduleLast tutorials: 1. How to create a simple module in Magento 22. Create a module with custom database table in Magento 23. How to use Model and Collection in Magento 24. How to create the configuration via backend for a 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
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)
Following Mageworld Magento2 Tutorial Series…
Recommended