문제

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>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top