在系统配置中添加“自定义”选项卡

大家好,

在这里,我向您解释如何在系统->配置区域中添加自定义标签。

好吧,首先,您需要一个扩展来为其构建配置。 如果您是Magento的新手,并且不知道如何创建自己的扩展,则此站点上有很多关于此扩展的文章,但是我的建议是从全新扩展开始进行测试。

现在介绍有趣的东西。 首先,您需要添加(或编辑)您的system.xml文件。

<?xml version="1.0" encoding="UTF-8"?> 
<config> 
<tabs> 
<inchoo translate="label" module="mymodule"> 
<label>Inchoo Extensions</label> 
<sort_order>100</sort_order> 
</inchoo> 
</tabs> 
<sections> 
<inchoo translate="label" module="mymodule"> 
<label>Extension Options</label> 
<tab>inchoo</tab> 
<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> 
<groups> 
<inchoo_group translate="label" module="mymodule"> 
<label>My Extension Options</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> 
<inchoo_input translate="label"> 
<label>My Input Field: </label> 
<comment>My Comment</comment> 
<frontend_type>text</frontend_type> 
<sort_order>20</sort_order> 
<show_in_default>1</show_in_default> 
<show_in_website>1</show_in_website> 
<show_in_store>1</show_in_store> 
</inchoo_input> 
<inchoo_select translate="label"> 
<label>My Dropdown: </label> 
<comment>Source model provider Magento’s default Yes/No values</comment> 
<frontend_type>select</frontend_type> 
<sort_order>90</sort_order> 
<show_in_default>1</show_in_default> 
<show_in_website>1</show_in_website> 
<show_in_store>1</show_in_store> 
<source_model>adminhtml/system_config_source_yesno</source_model> 
</inchoo_select> 
</fields> 
</inchoo_group> 
</groups> 
</inchoo> 
</sections> 
</config>  
然后,为了使用Magento的配置部分,您需要添加(或编辑)扩展程序的config.xml文件,并定义模型和助手位置。
<config> 
<modules> 
<Inchoo_Mymodule> 
<version>0.1.0</version> 
</Inchoo_Mymodule> 
</modules> 
<global> 
<models> 
<mymodule> 
<class>Inchoo_Mymodule_Model</class> 
</mymodule> 
</models> 
<helpers> 
<mymodule> 
<class>Inchoo_Mymodule_Helper</class> 
</mymodule> 
</helpers> 
</global> 
</config>  
最后,您需要再次编辑扩展程序的config.xml文件,以避免“权限被拒绝”。 问题。 将XML的这一部分插入“ <config> </ config>”标签内:
<adminhtml> 
<acl> 
<resources> 
<all> 
<title>Allow Everything</title> 
</all> 
<admin> 
<children> 
<system> 
<children> 
<config> 
<children> 
<inchoo> 
<title>Inchoo - All</title> 
</inchoo> 
</children> 
</config> 
</children> 
</system> 
</children> 
</admin> 
</resources> 
</acl> 
</adminhtml>  

如果您已正确完成所有操作,则应在管理面板syatem-> Configuration->左侧Inchoo Extension选项卡中看到。 -希望对您有帮助

From: https://bytes.com/topic/php/insights/948081-add-custom-tab-system-configuration

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在Vivado添加自定义IP核步骤如下: 1. 首先,确保你已经将自定义IP核设计完成,并且执行了合成等必要的操作。 2. 在Vivado创建新的工程。选择一个适当的文件夹和工程名称。 3. 在创建好的工程,打开“IP Catalog”窗口。通过点击“IP”菜单栏的“Open IP Catalog”或者在窗口下方的“IP”标签处使用快捷键“Ctrl + Shift + W”来打开该窗口。 4. 在“IP Catalog”窗口,选择“Repositories”下的“IP Repository”选项卡,然后点击右边的“+”按钮。 5. 在打开的窗口,浏览并选择你的自定义IP核的Xilinx格式的ip文件。点击“OK”按钮进行导入。 6. 导入完成后,你的自定义IP核将会显示在“IP Catalog”窗口的“User IP”选项卡。 7. 点击自定义IP核的图标,在右侧的“Customization Parameters”可以配置自定义IP核的参数。 8. 可以选择性地进行其他配置,例如接口的设置、时钟和复位的连接等。 9. 配置完成后,点击“OK”按钮,系统将会生成一个包含自定义IP核的例化模块。 10. 在Block Diagram等地方使用该例化模块,将其拖放至设计,并按需连接到其他设计模块。 11. 最后,完成设计后进行生成比特流文件等后续的操作。 通过以上步骤,你可以成功将自定义IP核添加到Vivado,并在你的设计使用它。注意,在添加自定义IP核之前,建议先阅读Vivado的相关文档和教程,以便更好地理解和掌握该过程。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值