Want an existing report to be in a different menu area
-
16-10-2019 - |
سؤال
I am trying to get the report here "admin/report_sales/sales" to be duplicated under my custom menu area. How should I do this as simply as possible? Should I create a menu item, then use a redirect? Do I actually have to use a controller to redirect?
المحلول
You can add a menu item to your menu with the same url. Here is an example with a piece of menu from adminhtml.xml of a custom module:
<menu>
<main_menu_code translate="title"><!-- this is the top level menu -->
<title>Main menu title</title>
<sort_order>80</sort_order>
<children>
<report translate="title"><!-- this is the menu item for the sales report -->
<title>Sales report</title>
<action>adminhtml/report_sales/sales</action>
<sort_order>20</sort_order>
</report>
</children>
</main_menu_code>
</menu>
[EDIT]
To make your new menu selected try adding this to one of your admin layout files
<adminhtml_report_sales_sales>
<reference name="menu">
<action method="setActive">
<menupath>main_menu_code/report</menupath><!-- replace values with your own menu tags -->
</action>
</reference>
</adminhtml_report_sales_sales>
لا تنتمي إلى magento.stackexchange