2013-07-05 173 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> 
相关问题