We used to have the expanded element in the group options when setting the system.xml file, e.g.
<sections>
 <groups>
 <groupx>
 <expanded>1</expanded>
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.
 asked May 27, 2017 at 22:04
 
 
 
 Yehia A.Salam 
 
 4291 gold badge12 silver badges29 bronze badges
 
 1 Answer 1
You can use <attribute type="expanded">1</attribute>
Ex:
<section id="helloworld" translate="label" sortOrder="130" showInDefault="1" showInWebsite="1" showInStore="1">
 <class>separator-top</class>
 <label>Hello World</label>
 <tab>helloworld</tab>
 <resource>Amit_Helloworld::hello_configuration</resource>
 <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>
 <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
 </field>
 <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>
 </field>
 </group>
</section>
 
 answered May 28, 2017 at 16:59
 
 
 
 amitshree 
 
 7,06412 gold badges65 silver badges121 bronze badges
 
 default