2013-05-16 82 views
0

我想在用戶添加/編輯/刪除功能的特定用戶類型中添加一個magento儀表板部分,因此我爲magento Admin創建了一個模塊,但未在管理員菜單中顯示。 我想在magento admin中顯示關聯菜單。Magento Admin中沒有顯示菜單

雖然它顯示在系統 - >配置 - >提前啓用/禁用設施。 config xml是。 0.1.0

<global> 
     <models> 
      <association> 
       <class>yanga_association_Model</class> 
       <resourceModel>association_mysql4</resourceModel> 
      </association> 
      <association_mysql4> 
       <class>yanga_association_Model_Mysql4</class> 
       <entities> 
        <association> 
         <table>association</table> 
        </association> 
       </entities> 
      </association_mysql4> 
     </models> 
     <resources> 
      <association_setup> 
       <setup> 
        <module>yanga_association</module> 
       </setup> 
       <connection> 
        <use>core_setup</use> 
       </connection> 
      </association_setup> 
      <association_write> 
       <connection> 
        <use>core_write</use> 
       </connection> 
      </association_write> 
      <association_read> 
       <connection> 
        <use>core_read</use> 
       </connection> 
      </association_read> 
     </resources> 
     <blocks> 
      <association> 
       <class>yanga_association_Block</class> 
      </association> 
     </blocks> 
     <helpers> 
      <association> 
       <class>yanga_association_Helper</class> 
      </association> 
     </helpers> 
    </global> 
    <admin> 
     <routers> 
      <association> 
       <use>admin</use> 
       <args> 
        <module>Yanga_Association</module> 
        <frontName>association</frontName> 
       </args> 
      </association> 
     </routers> 
    </admin> 
    <adminhtml> 
    <menu> 
     <association module="association"> 
      <title>Association</title> 
      <sort_order>71</sort_order>    
      <children> 
       <items module="association"> 
        <title>Manage Association</title> 
        <sort_order>0</sort_order> 
         <action>association/adminhtml_association</action> 
       </items> 

      </children> 
     </association> 
    </menu> 
    <acl> 
     <resources> 
      <all> 
       <title>Allow Everything</title> 
      </all> 
      <admin> 
       <children> 
        <system> 
         <children> 
          <config> 
           <children> 
            <Association> 
             <title>Association Module</title> 
             <sort_order>10</sort_order> 
            </Association> 
           </children> 
          </config> 
         </children> 
        </system> 
        <Yanga_Association> 
         <title>System Configuration Tab</title> 
         <sort_order>10</sort_order> 
        </yanga_Association> 
       </children> 
      </admin> 
     </resources> 
    </acl> 
    <layout> 
     <updates> 
      <association> 
       <file>association.xml</file> 
      </association> 
     </updates> 
    </layout> 
</adminhtml> 

請提供給我們的解決方案,如果有。 在此先感謝。

回答

0

如果您嘗試訪問系統正設置比你的代碼像

<config translate="title"> 
         <title>Configuration</title> 
         <sort_order>1</sort_order> 
         <action>adminhtml/system_config/edit/section/association</action> 
        </config> 

相反.Replace的這個代碼,並檢查it.Hops它的工作原理

0

你忘了添加菜單的許可在你的acl聲明中,你的ACL應該看起來像這樣 - :

<acl> 
    <resources> 
     <all> 
      <title>Allow Everything</title> 
     </all> 
     <admin> 
      <children> 
       <system> 
        <children> 
         <config> 
          <children> 
           <Association> 
            <title>Association Module</title> 
            <sort_order>10</sort_order> 
           </Association> 
          </children> 
         </config> 
        </children> 
       </system> 
       <association> 
        <title>Association</title> 
        <children> 
          <items translate="title" module="association"> 
           <title>Manage Association</title> 
          </items> 
        </children> 
       </association> 
       <Yanga_Association> 
        <title>System Configuration Tab</title> 
        <sort_order>10</sort_order> 
       </yanga_Association> 
      </children> 
     </admin> 
    </resources> 
</acl>` 

希望它有幫助!

乾杯 S