Magento 是否可以使用config.xml在管理菜单链接中添加哈希?
我有以下管理员菜单项的配置。我想在菜单项链接中包含一个散列,直接转到相应的组Magento 是否可以使用config.xml在管理菜单链接中添加哈希?,magento,Magento,我有以下管理员菜单项的配置。我想在菜单项链接中包含一个散列,直接转到相应的组 <adminhtml> <menu> <theme module="theme" translate="title"> <title>Theme</title> <sort_order>71</sort_order>
<adminhtml>
<menu>
<theme module="theme" translate="title">
<title>Theme</title>
<sort_order>71</sort_order>
<children>
<configuration module="theme" translate="title">
<title>Configuration</title>
<sort_order>3</sort_order>
<action>adminhtml/system_config/edit/section/design</action>
</configuration>
</children>
</theme>
</menu>
<adminhtml>
这是否可以使用config.xml实现?如果没有,最简单的方法是什么?顶部菜单URL使用以下代码构建: 这意味着无法向生成的URL添加其他参数或锚点 可能的解决方案包括重写block类
adminhtml/page\u菜单
,并评估一个额外的标记,例如称为
另一种可能是使用JavaScript重写该链接的URL。顶部菜单URL使用以下代码构建: 这意味着无法向生成的URL添加其他参数或锚点 可能的解决方案包括重写block类
adminhtml/page\u菜单
,并评估一个额外的标记,例如称为
另一种可能是使用JavaScript重写该链接的URL。我认为更好的解决方案是简单的重定向,而不是重写核心文件或JavaScript。只需添加重定向到所需页面的url(带参数): adminhtml.xml:
mymodule/adminhtml\u controller/redirecttoproduct
在控制器文件中:
public function redirecttoproductAction(){
return $this->_redirect('adminhtml/catalog_product/edit', array(
'id' => 168,
'tab' => 'product_info_tabs_group_95'
));
}
我认为更好的解决方案是简单的重定向,而不是重写核心文件或JavaScript。只需添加重定向到所需页面的url(带参数): adminhtml.xml:
mymodule/adminhtml\u controller/redirecttoproduct
在控制器文件中:
public function redirecttoproductAction(){
return $this->_redirect('adminhtml/catalog_product/edit', array(
'id' => 168,
'tab' => 'product_info_tabs_group_95'
));
}
public function redirecttoproductAction(){
return $this->_redirect('adminhtml/catalog_product/edit', array(
'id' => 168,
'tab' => 'product_info_tabs_group_95'
));
}