1

我在 Magento 的管理面板(自定义扩展)中创建自定义菜单。我想知道如何为管理菜单创建块和模型。

在这里,我只是通过本教程并创建管理面板菜单。

例如 :

--News
   --Managed News

而且我还在我的自定义菜单中创建了不同的子菜单。例如:

--News
  --Managed News
  --News Details
  --News Management. and so on.

这是我在自定义菜单中创建子菜单的代码。

应用程序/代码/社区///etc/adminhtml.xml

 <menu>
         <news translate="title" module="magentostudy_news">
            <title>News</title>
            <sort_order>65</sort_order>
            <children>
                <manage translate="title" module="magentostudy_news">
                    <title>Manage News</title>
                    <action>adminhtml/news</action>
                    <sort_order>50</sort_order>
                </manage>
                <weaves translate="title" module="magentostudy_news">
                    <title>News Details </title>
                    <action>adminhtml/details</action>
                    <sort_order>60</sort_order>
                </weaves>
            </children>
         </news>
    </menu>

adminhtml/NewsController.php为第一个子菜单创建并创建块(包括网格、编辑、表单和选项卡)、模型和 sql(动态表)。但是当我adminhtml/Detailscontroller.php为第二个子菜单创建相同的过程时。它不会在我的 magento 数据库中创建动态表。如何为自定义模块创建动态表以及如何创建管理子菜单的功能(模型、控制器、sql 和视图)。请指导我。

提前致谢...

4

0 回答 0