首页 > 解决方案 > 如何更改 nopcommerce 管理侧菜单的显示名称

问题描述

问题截图: 在此处输入图像描述

我想更改显示名称。

将此行添加到sidemap.config

<siteMapNode SystemName="Customer reports" nopResource="Admin.Reports.Customers" PermissionNames="ManageCustomers" controller="Report" action="Customers" IconClass="fa-dot-circle-o" />

将此行添加到defaultResources.nopres.xml

 <LocaleResource Name="Admin.Reports.Rewords">
    <Value>Reword Reports</Value>
  </LocaleResource>

我正在阅读这个博客: http: //lateshtclick.com/blogpost/adding-a-new-menu-item-in-admin-panel

但它不起作用!:(

我正在使用 NopCommerce 4.1

标签: asp.net-corenopcommercenopcommerce-4.1

解决方案


默认资源会在 nopCommerce 安装时添加到数据库中,因此如果您尝试以编程方式添加任何条目,您也需要将该记录添加到数据库中。检查所需资源是否可用:

转到 admin > configuration > Languages > English(default) > Edit > String resources 选项卡
并尝试使用 Resource name 搜索Admin.Reports.Rewords,您会发现记录不存在,现在通过 Add new 按钮手动添加它,并检查它的管理菜单。

希望这可以帮助!


推荐阅读