MB_AdminCategoryStyle je mali Magento 2 modul koji olakšava vizuelno razlikovanje aktivnih i neaktivnih kategorija u Admin panelu.
Na stranici Catalog > Categories:
- aktivne kategorije zadržavaju originalni Magento izgled;
- neaktivne kategorije dobijaju svetliju boju fonta (
#777); - klik, izmena, proširivanje stabla i prevlačenje kategorija ostaju nepromenjeni.
Modul koristi postojeću Magento CSS klasu not-active-category. Ne menja Magento core, podatke kategorija niti ponašanje prodavnice. Nema JavaScript, bazne tabele, cron poslove ni Admin konfiguraciju.
Modul je funkcionalno testiran na Magento Open Source v2.4.7-p3 u staging okruženju. Neaktivne kategorije prikazane su svetlijim fontom, dok aktivne kategorije zadržavaju originalni izgled.
- Ne menja Magento core niti
vendor/fajlove, pa Magento nadogradnja ne briše izmenu. - CSS se učitava samo na stranici Catalog > Categories i ne utiče na ostatak Admin panela.
- Ne zavisi od storefront teme i radi uz Luma, Hyvä ili drugu temu. Izmena u običnoj storefront temi uglavnom se uopšte ne učitava u Admin panelu.
- Posebna Admin tema može postići sličan rezultat, ali tada je funkcija vezana za tu temu i teže se prenosi između projekata.
- Modul se jednostavno uključuje, isključuje, verzioniše i instalira na drugom Magento projektu.
- Ne menja podatke niti ponašanje kategorija, već samo njihov vizuelni prikaz.
Zaseban modul je zato čistije, stabilnije i dugoročno jednostavnije rešenje.
- Magento Open Source 2.4.5+
- Adobe Commerce 2.4.5+
- Nije povezan sa storefront temom; radi u Magento Admin oblasti i ne zahteva Hyvä compatibility modul.
Navedena kompatibilnost je zasnovana na strukturi Magento Category tree-a. Pre produkcije proverite izgled u vašoj konkretnoj Magento verziji i Admin temi.
Kopirajte sadržaj repozitorijuma u:
app/code/MB/AdminCategoryStyle
Zatim, iz Magento root direktorijuma, pokrenite:
bin/magento module:enable MB_AdminCategoryStyle
bin/magento setup:upgrade
bin/magento cache:clean layout block_htmlU production modu ponovo generišite Admin static content prema vašem deployment procesu, na primer:
bin/magento setup:static-content:deploy -fAko je privatni repozitorijum dodat kao Composer VCS repository:
composer require mb/module-admin-category-style
bin/magento module:enable MB_AdminCategoryStyle
bin/magento setup:upgrade
bin/magento cache:clean layout block_htmlBoja se nalazi u fajlu:
view/adminhtml/web/css/category-tree.css
Podrazumevana vrednost je #777. Aktivne kategorije nemaju dodatno CSS pravilo i zato ostaju nepromenjene.
bin/magento module:disable MB_AdminCategoryStyle
bin/magento setup:upgrade
bin/magento cache:clean layout block_htmlNakon toga uklonite direktorijum modula ili Composer paket.
MB_AdminCategoryStyle is a small Magento 2 module that makes active and inactive categories easier to distinguish in the Admin panel.
On Catalog > Categories:
- active categories retain Magento's original appearance;
- inactive categories use a lighter font color (
#777); - clicking, editing, expanding the tree, and dragging categories remain unchanged.
The module uses Magento's existing not-active-category CSS class. It does not modify Magento core, category data, or storefront behavior. It contains no JavaScript, database tables, cron jobs, or Admin configuration.
The module has been functionally tested on Magento Open Source v2.4.7-p3 in a staging environment. Inactive categories are displayed with a lighter font color, while active categories retain their original appearance.
- It does not modify Magento core or
vendor/files, so Magento upgrades do not remove the customization. - The CSS loads only on Catalog > Categories and does not affect the rest of the Admin panel.
- It is independent of the storefront theme and works with Luma, Hyvä, or another theme. A regular storefront-theme change is generally not loaded in the Admin panel at all.
- A dedicated Admin theme can achieve a similar result, but the feature then becomes coupled to that theme and is harder to move between projects.
- The module is easy to enable, disable, version, and install on another Magento project.
- It changes only the visual presentation, not category data or behavior.
A standalone module is therefore a cleaner, more stable, and easier long-term solution.
- Magento Open Source 2.4.5+
- Adobe Commerce 2.4.5+
- Storefront-theme independent; it runs in the Magento Admin area and does not require a Hyvä compatibility module.
Compatibility is based on the Magento Category tree structure. Verify the visual result with your exact Magento version and Admin theme before production deployment.
Copy the repository contents to:
app/code/MB/AdminCategoryStyle
Then run the following commands from the Magento root directory:
bin/magento module:enable MB_AdminCategoryStyle
bin/magento setup:upgrade
bin/magento cache:clean layout block_htmlIn production mode, regenerate Admin static content according to your deployment process, for example:
bin/magento setup:static-content:deploy -fAfter adding the private repository as a Composer VCS repository:
composer require mb/module-admin-category-style
bin/magento module:enable MB_AdminCategoryStyle
bin/magento setup:upgrade
bin/magento cache:clean layout block_htmlThe color is defined in:
view/adminhtml/web/css/category-tree.css
The default value is #777. No additional CSS rule is applied to active categories, so their original appearance is preserved.
bin/magento module:disable MB_AdminCategoryStyle
bin/magento setup:upgrade
bin/magento cache:clean layout block_htmlThen remove the module directory or Composer package.
GNU General Public License v3.0 or later (GPL-3.0-or-later). See LICENSE.
