0

I am trying to create tabs in magento admin panel but it is not working. I tried running all the commands and cache clear. Please check if everything is fine with the code `

<system>
 <tab id="mymodule" translate="label" class="a-custom-css-class-to-style-this-tab" sortOrder="10">
 <label>A meaningful label</label>
 </tab>
 <section id="blog" showInDefault="1" showInWebsite="1" showInStore="1" sortOrder="10" translate="label">
 <label>A meaningful section label</label>
 <tab>mymodule</tab>
 <group id="general" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1">
 <label>A meaningful group label</label>
 <comment>An additional comment helping users to understand the effect when configuring the fields defined in this group.</comment>
 <field id="enable" translate="label" sortOrder="10" showInDefault="1" showInWebsite="1" showInStore="1" type="select">
 <label>Feature Flag Example</label>
 <comment>This field is an example for a basic yes or no select.</comment>
 <tooltip>Usually these kinds of fields are used to enable or disable a given feature. Other fields might be dependent to this and will only appear if this field is set to yes.</tooltip>
 <source_model>Magento\Config\Model\Config\Source\Yesno</source_model>
 </field>
 </group>
 </section>
</system>

`

And also created etc/config.xml

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Store:etc/config.xsd">
 <default>
 <blog>
 <general>
 <enable>Yes</enable>
 </general>
 </blog>
 </default>
</config>

Please let me know what I am doing or what can be the possible solution

Sumit
5,0482 gold badges22 silver badges36 bronze badges
asked Jul 21, 2022 at 20:09

2 Answers 2

1

I think this might may be helpful for you

https://meetanshi.com/blog/create-a-tab-and-load-grid-in-magento-2-customer-admin-edit-page/

But you can check the directory path, because there is some minor mistake that produce this problem.

answered Jul 22, 2022 at 15:12
1
  • Thanks @rana zain , I found the issue , I was missing <resource> node in <section>. after focusing on the code I found this Commented Jul 25, 2022 at 5:18
0

I found the issue for the solution that I was missing <resource> node in <section>

Hope this answer can help others in case you face in future

answered Jul 25, 2022 at 5:19

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.