magento 第2炮 admin module

所有管理工作的網頁,因爲這同樣的方式。 爲了使自己的,你需要;

 

  1. 註冊一個 controller 在你的 module. 或者重寫 overloading controllers .
  2. 在你的 controller 的 action 方法 render the layout.
  3. 創建一個 layout file in the "app/design/adminhtml/default/layout" 目錄 and 註冊你的 "config.xml"
  4.  它必須匹配你的 route, controller and action.
  5. 添加一個 block to 顯示a grid widget.
  6. 擴展 Mage_Adminhtml_Block_Widget_Grid 到自己的block.
  7. 添加  _prepareColumns() and   _prepareCollection() 方法  用於要連接數據庫and 過濾結果
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章