2013-07-05 172 views
4
Finder 
Setting 

什麼應該是從管理菜單設置到我們的自定義模塊的系統/配置的URL。Magento自定義模塊:如何創建管理菜單

<menu> 
<finder module="finder"> 
    <title>finder</title> 
    <sort_order>71</sort_order>    
     <children> 
    <items module="finder"> 
    <title>Manage Finder</title> 
    <sort_order>0</sort_order> 
    <action>finder/adminhtml_finder</action> 
    </items> 
     <items module="finder"> 
    <title>Setting</title> 
    <sort_order>0</sort_order> 
    <action> ???? </action> 
</items> 
    </children> 
    </finder> 
    </menu> 

回答

1

你可以把下面添加到系統配置目錄中。你必須創建system.xml

<?xml version="1.0"?> 
<config> 
    <tabs> 
     <helloconfig translate="label" module="todaydeal"> 
      <label>Today Deal</label> 
      <sort_order>99999</sort_order> 
     </helloconfig> 
    </tabs> 
    <sections> 
     <catalog> 
      <groups> 
       <todaydeal translate="label" module="todaydeal"> 
        <label>Daily Deal</label> 
        <frontend_type>text</frontend_type> 
        <sort_order>1000</sort_order> 
        <show_in_default>1</show_in_default> 
        <show_in_website>1</show_in_website> 
        <show_in_store>1</show_in_store> 

        <fields> 
         <active translate="label"> 
          <label>Enabled</label> 
          <frontend_type>select</frontend_type> 
          <source_model>adminhtml/system_config_source_yesno</source_model> 
          <sort_order>1</sort_order> 
          <show_in_default>1</show_in_default> 
          <show_in_website>1</show_in_website> 
          <show_in_store>0</show_in_store> 
         </active>       
        </fields> 
       </todaydeal> 
      </groups> 
     </catalog> 
    </sections> 
</config> 

你也可以參考詳細Document LINK,我相信我對你非常有幫助。

讓我知道如果我能幫助你進一步

+0

是的,這將創建系統/配置中的設置部分,但將打開它的鏈接是什麼。 <項模塊= 「取景器」> 設置 ????

+0

你的意思是你想在系統配置中使用自定義表數據而不是core_config_data調用你的自定義模塊? – liyakat

1

您可以使用下面的代碼創建管理方的菜單,也有動作做系統/ configuration.Add按照應用程序/代碼代碼/本地/ [Name_Space]/[Module_Name] /etc/config.xml

 <adminhtml> 
     <menu> 
            <news module="news"> 
                <title>News</title> 
                <sort_order>71</sort_order>                
                <children> 
                    <items module="news"> 
                        <title>Manage Items</title> 
                        <sort_order>0</sort_order> 
                        <action>news/adminhtml_news</action> 
                    </items> 
                    <items1 module="news"> 
                        <title>Import News Data</title> 
                        <sort_order>1</sort_order> 
                        <action>adminhtml/system_config/edit/section/news</action> 
                    </items1> 
                </children> 
            </news> 
        </menu> 
  </adminhtml> 

請注意,這裏的新聞將與system.xml文件中的section名稱相同。

+0

優秀的...幫助我..短而聰明的... +1 –

1

嗨添加以下代碼而不是<itmes>

<config module="finder"> 
         <title>Configurations</title> 
         <sort_order>10</sort_order> 
         <action>adminhtml/system_config/edit/section/finder</action> 
        </config> 

       Write down ACL code after the </menu> ending tag. Your code will be like this 

       <acl> 
    <resources> 
     <all> 
      <title>Allow Everything</title> 
     </all> 
     <admin> 
      <children> 
       <My_module> 
        <title>My finder Module</title> 
        <sort_order>10</sort_order> 
       </My_module> 
       <system> 
        <children> 
        <config> 
         <children> 
         <finder> 
          <title>finder Module Section</title> 
         </finder> 
         </children> 
        </config> 
        </children> 
       </system> 
      </children> 
     </admin> 
    </resources> 
</acl> 
相關問題