所有管理工作的網頁,因爲這同樣的方式。 爲了使自己的,你需要;
- 註冊一個 controller 在你的 module. 或者重寫 overloading controllers .
- 在你的 controller 的 action 方法 render the layout.
- 創建一個 layout file in the "app/design/adminhtml/default/layout" 目錄 and 註冊你的 "config.xml"
- 它必須匹配你的 route, controller and action.
- 添加一個 block to 顯示a grid widget.
擴展
Mage_Adminhtml_Block_Widget_Grid
到自己的block.- 添加
_prepareColumns()
and_prepareCollection()
方法 用於要連接數據庫and 過濾結果