2015-09-14 77 views
1

是否有一個很好的教程或例子,如何創建一個新的管理菜單項?我已經設法創建了一個新項目,但現在我很難過。如何使用Magento的列表和編輯視圖來顯示和編輯數據?Magento:添加到管理菜單

回答

0

任何模塊的應用程序/代碼/本地/命名空間/模塊/ etc/config.xml文件負責管理菜單。下面的代碼片段添加在Magento管理區自定義菜單選項的模塊調用調查: -

<adminhtml> 
<menu> 
    <survey module="survey"> 
    <title>Survey</title> 
    <sort_order>100</sort_order> 
    <children> 
     <surveybackend module="survey"> 
     <title>Stats</title> 
     <sort_order>0</sort_order> 
     <action>admin_survey/adminhtml_surveybackend</action> 
     </surveybackend> 
     <survey module="survey"> 
     <title>Manage Survey</title> 
     <sort_order>0</sort_order> 
     <action>admin_survey/adminhtml_survey</action> 
     </survey> 
     <question module="survey"> 
     <title>Manage Question</title> 
     <sort_order>10</sort_order> 
     <action>admin_survey/adminhtml_question</action> 
     </question> 
    </children> 
    </survey> 
</menu> 
<acl> 
    <resources> 
    <all> 
     <title>Allow Everything</title> 
    </all> 
    <admin> 
     <children> 
     <survey translate="title" module="survey"> 
      <title>Survey</title> 
      <sort_order>1000</sort_order> 
      <children> 
     <surveybackend translate="title"> 
     <title>Stats</title> 
     </surveybackend> 
     <survey translate="title"> 
     <title>Manage Survey</title> 
     <sort_order>0</sort_order> 
     </survey> 
     <question translate="title"> 
     <title>Manage Question</title> 
     <sort_order>10</sort_order> 
     </question> 
      </children> 
     </survey> 
     </children> 
    </admin> 
    </resources> 
</acl> 
<layout> 
    <updates> 
    <survey> 
     <file>survey.xml</file> 
    </survey> 
    </updates> 
</layout> 

下面是截圖:

enter image description here

而且它能夠更好地參考一些簡單的自定義擴展或模塊的magento或者你可以在這裏生成你自己的模塊: -

http://www.silksoftware.com/magento-module-creator/

隨意點擊並嘗試各種選項。這裏生成的模塊將提供一個更好的想法,即如何生成菜單並鏈接到其受尊敬的頁面,網格等。

相關問題