Working with Magento configuration it is always a chore. To make a change, you have to find a necessary section, then open it, then open its subsection, then sub-subsection and probably some moreā¦ and only after a dozen of cliŃks you can finally change necessary Magento configuration item.
Once, while testing new functionality, after routine search of some rarely used settings, I finally got tired and decided to improve this process a little bit.
My attention was drawn to the search field at the top of the admin panel. Existing āadmin search' already knew how to perform search among customers, products and orders, so why not to add configuration section to this list as well? As always, I expected that I would have to rewrite basic functionality to achieve the desired result, but I found out a nice way to extend this functionality.
Configurations for the search is stored in the file below:
app/code/core/Mage/Adminhtml/etc/config.xml
<?xml version="1.0"?>
<config>
<!-- ... -->
<adminhtml>
<!-- ... -->
<global_search>
<products>
<class>adminhtml/search_catalog</class>
<acl>catalog</acl>
</products>
<customers>
<class>adminhtml/search_customer</class>
<acl>customer</acl>
</customers>
<sales>
<class>adminhtml/search_order</class>
<acl>sales</acl>
</sales>
</global_search>
</adminhtml>
</config>
So, the injection was very easy. I had to add my search model only into the adminhtml/global_search node.
My ConfigSearch model is looking for the matches in the config fields labels, also it takes into account translations. The search result shows you the full config field label and its full path. When matches are found, you'll see something like this:
When you click on one of the displayed results, you'll be redirected to the page with this configuration section opened. The field will also be highlighted, so you can find and edit it even more quickly. Task is done!
I hope that this extension will help you a little bit with the navigation in the Magento Admin panel.