We used to have the expanded element in the group options when setting the system.xml file, e.g.


but it's no longer there in the new structure in Magento 2, I checked system_file.xsd and couldn't find it. Is there an alternative in Magento 2 to have all the groups expanded by default.

1 Answer 1


You can use <attribute type="expanded">1</attribute>


<section id="helloworld" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
    <label>Hello World</label>
    <group id="general" translate="label" type="text" sortOrder="10" showInDefault="1" showInWebsite="0" showInStore="0">
        <label>General Configuration</label>
        <attribute type="expanded">1</attribute>
        <field id="enable" translate="label" type="select" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
            <label>Module Enable</label>
        <field id="display_text" translate="label" type="text" sortOrder="1" showInDefault="1" showInWebsite="0" showInStore="0">
            <label>Display Text</label>
            <comment>This text will display on the frontend.</comment>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.