I'd like to add an icon like this image below, my custom module creates a new tab on this same route Stores > Settings > Configuration.
So how can I add an icon like that red?
Thanks
I haven't tested this, but it looks like it might work.
Make the system.xml
look like this:
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
<system>
<section id="section_id_here" translate="label" type="text" sortOrder="400" showInDefault="1" showInWebsite="1" showInStore="1">
<label>Section label here</label>
<tab>tab_name_here</tab>
<resource>Vendor_Module::acl_name</resource>
<class>my-custom-class</class>
</section>
</system>
</config>
Now you get a special class (my-custom-class
) added to your section and you can control that via css files.
It works for tabs also but a bit different.
The class must be added as an attribute
<tab id="tab_id_here" translate="label" sortOrder="400" class="my-tab-class">
<label>Tab label</label>
</tab>