Magento 自定义模块配置组未折叠

Magento custom module configuration groups not collapsed

我正在为 Magento 开发一个自定义模块,我已经为它创建了一个包含几组字段的配置页面。到目前为止它工作正常但我知道这些组应该默认折叠但是我的在加载页面时全部展开并且仅在用户折叠它们时折叠。

我的 system.xml 文件:

<config>
    <tabs>
            <mymoduletab translate="label" module="mymodule">
                    <label>My Module</label>
                    <sort_order>400</sort_order>
            </mymoduletab>
    </tabs>
    <sections>
            <mymoduleoptions translate="label" module="mymodule">
                    <label>My Module Options</label>
                    <tab>mymoduletab</tab>
                    <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>

                    <groups>
                            <basicoptions translate="label">
                                    <label>Basic Options</label>
                                    <frontend_type>text</frontend_type>
                                    <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>
                                    <fields>...

谁能指出我这里做错了什么?谢谢。我能找到的 Magento 开发文档很少。

显然,当您保存配置值时,组的状态会保存在数据库中。如果您在组打开的情况下保存这些值,它们将默认打开,即使在注销并重新登录后也是如此。我找不到它们的保存位置。

其实你只需要将以下内容添加到你要打开的组中:

<expanded>1</expanded>