Need to follow below steps to accurately make your module working with Magedelight_Base
-
Your module must have a seprate menu item
-
Your root level menu item must have the naming convension as below.
-
Add new item in menu.xml after above menu item.
-
in your etc/adminhtml/system.xml, your section must look like follow.
md_section_{modulename} magedelight ... -
create following file in your module. Path: {Vendor}/{Module}/view/adminhtml/web/css/source/ File: _module.less
contents: @md-{<small_caps>modulename}-icons-admin__font-name-path: '@{baseDir}{Vendor}_{Module}/fonts/icon'; @md-{<small_caps>modulename}-icons-admin__font-name : '{Module}'; .lib-font-face( @family-name:@md-{<small_caps>modulename}-icons-admin__font-name, @font-path: @md-{<small_caps>modulename}-icons-admin__font-name-path, @font-weight: normal, @font-style: normal );
.admin__menu .item-{<small_caps>modulename}-root-commonlyvisible > a:before, .admin__menu .item-{<small_caps>modulename}-root.parent.level-0 .submenu > .submenu-title:before, .config-nav-block .md_section_{<small_caps>modulename} a:before { font-family: @md-{<small_caps>modulename}-icons-admin__font-name; content: "{content to be taken from icomoon or appropriate library}"; padding-right: 8px; }
-
download relevent icon files from icomoon app. Filename should be as it is (icon.ext). icon.eot icon.svg icon.ttf icon.woff (copy it with icon.woff2)
and place above files in following location. Path: {Vendor}/{Module}/view/adminhtml/web/fonts/
-
Your module acl.xml should look like this. So every module of Magedelight will fall into Base Resource.
<resource id="Magento_Backend::stores"> <resource id="Magento_Backend::stores_settings"> <resource id="Magento_Config::config"> <resource id="Magedelight_Base::config_root"> <resource id="{Vendor}_{Module}::config_root" title="{Title}" sortOrder="{your_module_sortorder}" /> </resource> </resource> </resource> </resource> </resource> </resources> </acl>
-
update your module composer.json file with following content ... "require": { ... "magedelight/base": "*", ... }
-
update etc/module.xml to have following sequence. ... ...
-
Update documentation link to your menu.xml file by adding following 2 menu items at last
-
Create etc/adminhtml/di.xml file or modify content if exists as below
-
Create Plugin\Magento\Backend\Model\Menu\Item.php with followng code
* * @category Magedelight * @package {Vendor}_{Module} * @copyright Copyright (c) 2019 Mage Delight (http://www.magedelight.com/) * @license http://opensource.org/licenses/gpl-3.0.html GNU General Public License,version 3 (GPL-3.0) * @author Magedelight */ namespace {Vendor}\{Module}\Plugin\Magento\Backend\Model\Menu; class Item { public function afterGetUrl($subject, $result) { $menuId = $subject->getId(); if ($menuId == '{Vendor}_{Module}::documentation') { $result = 'http://docs.magedelight.com/{documentation_url}'; } return $result; } }