Magento自定义模块:如何创建管理菜单
从管理菜单设置转到自定义模块的系统/配置的url应该是什么Magento自定义模块:如何创建管理菜单,magento,Magento,从管理菜单设置转到自定义模块的系统/配置的url应该是什么 Finder Setting 发现者 71 管理查找器 0 finder/adminhtml\u finder 背景 0 ???? 您可以采用以下方法添加到系统配置目录中。您必须创建system.xml <menu> <finder module="finder"> <title>finder</title> <sort_order>71</sort
Finder
Setting
发现者
71
管理查找器
0
finder/adminhtml\u finder
背景
0
????
您可以采用以下方法添加到系统配置目录中。您必须创建system.xml
<menu>
<finder module="finder">
<title>finder</title>
<sort_order>71</sort_order>
<children>
<items module="finder">
<title>Manage Finder</title>
<sort_order>0</sort_order>
<action>finder/adminhtml_finder</action>
</items>
<items module="finder">
<title>Setting</title>
<sort_order>0</sort_order>
<action> ???? </action>
</items>
</children>
</finder>
</menu>
今日交易
99999
每日交易
文本
1000
1.
1.
1.
,我相信我会对你很有帮助的
如果我可以进一步帮助您,请告诉我。您可以使用以下代码创建管理端菜单,还可以执行系统/配置操作。在app/code/local/[Name\u Space]/[Module\u Name]/etc/config.xml中添加以下代码
<?xml version="1.0"?>
<config>
<tabs>
<helloconfig translate="label" module="todaydeal">
<label>Today Deal</label>
<sort_order>99999</sort_order>
</helloconfig>
</tabs>
<sections>
<catalog>
<groups>
<todaydeal translate="label" module="todaydeal">
<label>Daily Deal</label>
<frontend_type>text</frontend_type>
<sort_order>1000</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>1</show_in_store>
<fields>
<active translate="label">
<label>Enabled</label>
<frontend_type>select</frontend_type>
<source_model>adminhtml/system_config_source_yesno</source_model>
<sort_order>1</sort_order>
<show_in_default>1</show_in_default>
<show_in_website>1</show_in_website>
<show_in_store>0</show_in_store>
</active>
</fields>
</todaydeal>
</groups>
</catalog>
</sections>
</config>
新闻
71
管理项目
0
新闻/行政新闻
导入新闻数据
1
adminhtml/system\u config/edit/section/news
请注意,此处的新闻与system.xml文件中的节名相同。您好,请添加以下代码,而不是
配置
10
adminhtml/system\u config/edit/section/finder
在结束标记后写下ACL代码。您的代码如下所示
允许一切
我的查找模块
10
查找器模块部分
杰克你可以采取如下行动:
<config module="finder">
<title>Configurations</title>
<sort_order>10</sort_order>
<action>adminhtml/system_config/edit/section/finder</action>
</config>
Write down ACL code after the </menu> ending tag. Your code will be like this
<acl>
<resources>
<all>
<title>Allow Everything</title>
</all>
<admin>
<children>
<My_module>
<title>My finder Module</title>
<sort_order>10</sort_order>
</My_module>
<system>
<children>
<config>
<children>
<finder>
<title>finder Module Section</title>
</finder>
</children>
</config>
</children>
</system>
</children>
</admin>
</resources>
</acl>
这是一个很好的例子。您可以参考下面的链接在Magento2中创建管理菜单:
说明:
您需要在模块的\etc\adminhtml\内创建menu.xml文件
在
标记中添加以下代码
<action>adminhtml/system_config/edit/section/your menu item</action>
此代码将创建一个名为NEWS
的菜单,该菜单位于标题CUSTOM
是下,该菜单将在系统/配置中创建设置部分,但打开它的链接是什么。设置0????你的意思是想用自定义表数据而不是系统配置中的核心配置数据调用自定义模块?太好了。。。帮了我。。又短又聪明+1.
<action>adminhtml/system_config/edit/section/your menu item</action>
<add id="Custom_Module::custom" title="CUSTOM" translate="title" module="Custom_Module" sortOrder="90" dependsOnModule="Custom_Module" resource="Custom_Module::custom"/>
<add id="Custom_Module::news" title="News" translate="title" module="Custom_Module" parent="Custom_Module::custom" sortOrder="50" dependsOnModule="Custom_Module" resource="Custom_Module::news"/>