Magento – how to create section and tabs in admin panel

admin

how to create new section anenter image description hered new tab in admin panel.
i have tried groups under sections and fields under groups, but not able to create sections.
Could you please explain in detail how to create sections and tabs in admin panel…

Thanks in advance for help

Best Answer

If you want all the details please check the links provided by Alan Storm and others. As this has been documented extensively before I will only provide a simple example for the sake of answering the question.

  1. Create your own extension with your namespace (called Vendor in the following) and extension name (Extensionname).

  2. Add the file app/code/[codePool]/[Vendor]/[Extensionname]/etc/system.xml. From your text I assume that you already did that.

  3. First important bit: when adding a new section, specify the correct tab name as specified in the system.xml under

    <config>
      <tabs>
        <[tabname] translate="label" module="[module]">
          <label>Tab name</label>
          <sort_order>10</sort_order>
        </[tabname]>
      </tabs>
    </config>
    

    E.g.

    <config>
      <sections>
        <yoursection translate="label" module="customer">
          <class>separator-top</class>
          <label>Your section</label>
          <tab>customer</tab> <!-- the important one -->
          <sort_order>10</sort_order>
          <show_in_default>1</show_in_default>
          <show_in_website>1</show_in_website>
          <show_in_store>1</show_in_store>
        </yoursection>
      </sections>
    </config>
    
  4. Add your groups and fields as usual.

  5. Second important bit add the section to the ACL in app/code/[codePool]/[Vendor]/[Extensionname]/etc/adminhtml.xml so that you can enter the section (after you have added the permission to the backend users and logged out/in again).

    <config>
        <acl>
            <resources>
                <admin>
                    <children>                 
                        <system>
                            <children>
                                <config>
                                    <children>
                                        <yoursection translate="title" module="customer">
                                            <title>Your section</title>
                                            <sort_order>10</sort_order>
                                        </yoursection>
                                    </children>
                                </config>
                            </children>
                        </system>
                    </children>
                </admin>
            </resources>
        </acl>
    </config>
    

Even without groups and fields you should be able to see the section.

Related Topic